Syntactic Confectionery Delight | |
PerlMonks |
Re^5: the '..' operator and decreasing valuesby Tanktalus (Canon) |
on Mar 05, 2005 at 00:41 UTC ( [id://436826]=note: print w/replies, xml ) | Need Help?? |
I was about to post a benchmark, then I noticed that you were referring to 5.8.6. So I decided that now would be a good time to upgrade. So I did - spent the last little bit compiling, testing, and installing perl 5.8.6. Then I realised that my benchmark wasn't actually testing for, just the creation and reversing of the list. So, comparing them, I'd have to say that something just went wrong. Noting that "perl" is perl 5.8.6, and "perl5.8.5" is, obviously, perl 5.8.5, and the script is called "y" (because I'm lazy): Two things - first off, the difference between perl 5.8.6 and 5.8.5 is more significant than the difference between forward and backward, and the difference between forward and backward is actually worse. Granted, this is just a lazy list of numbers, not an actual array of scalars, but it's still somewhat disconcerting. Perhaps the P5P team put in a premature optimisation? ;-) Note that I reran the test with this code: Again, perl 5.8.5 is faster than 5.8.6 here: I would have expected, though, that perl 5.8.6 would have statistically-insignficant difference in speed between forward and backward iteration. That does not seem to be the case - 5.8.6 made the difference in speed worse vs 5.8.5. This is all based on a valid benchmark test - which is why I post the code. Anyone have anything that I might be missing, please tell me. Both 5.8.5 and 5.8.6 were compiled on the same OS, with nearly every option set to whatever default Configure sets them to, and the exception is something they both share: install path. Only difference I can think of is that 5.8.6 has a longer @INC, as it includes the 5.8.5 directories, but I don't see how that would play into this benchmark.
In Section
Seekers of Perl Wisdom
|
|