Hmm.. Redefining makes a significant difference. That is odd, I didn't beleive that any of those functions where modifying the list. Which one is modifying the list?
C:\test>perl 429768.pl
(warning: too few iterations for a reliable count)
Rate Grep Grep + Map Hash Map Router Trinary Origi
+nal Switch
Grep 9699/s -- -36% -39% -42% -44% -47% -
+52% -65%
Grep + Map 15244/s 57% -- -5% -9% -12% -17% -
+24% -45%
Hash 16000/s 65% 5% -- -5% -8% -12% -
+20% -43%
Map 16835/s 74% 10% 5% -- -3% -8% -
+16% -40%
Router 17301/s 78% 13% 8% 3% -- -5% -
+13% -38%
Trinary 18282/s 88% 20% 14% 9% 6% --
+-9% -34%
Original 20000/s 106% 31% 25% 19% 16% 9%
+ -- -28%
Switch 27855/s 187% 83% 74% 65% 61% 52%
+39% --
C:\test>perl 429768.pl
Rate Grep Grep + Map Map Hash Router Trinary Origi
+nal Switch
Grep 9625/s -- -38% -41% -41% -45% -47% -
+53% -66%
Grep + Map 15420/s 60% -- -5% -5% -12% -16% -
+25% -46%
Map 16194/s 68% 5% -- -0% -8% -11% -
+22% -43%
Hash 16194/s 68% 5% 0% -- -8% -11% -
+22% -43%
Router 17544/s 82% 14% 8% 8% -- -4% -
+15% -38%
Trinary 18282/s 90% 19% 13% 13% 4% -- -
+11% -36%
Original 20640/s 114% 34% 27% 27% 18% 13%
+ -- -27%
Switch 28450/s 196% 84% 76% 76% 62% 56%
+38% --
|