in reply to Re^4: Can this code be optimized further?
in thread Can this code be optimized further?

Not sure - I'll check though.

Here's my results - I have what you have, but no Grep + Map, and Switch is now Substr Hash (more flexible), plus added the suggestion for split (slightly modified).


Rate Eval Grep Map REHash SplHash Router REEq Or +ig SubHash Eval 5522/s -- -35% -52% -54% -55% -58% -58% -6 +2% -72% Grep 8432/s 53% -- -26% -30% -32% -35% -36% -4 +2% -58% Map 11468/s 108% 36% -- -5% -8% -12% -13% -2 +1% -42% REHash 12092/s 119% 43% 5% -- -3% -7% -8% -1 +6% -39% SplHash 12407/s 125% 47% 8% 3% -- -5% -6% -1 +4% -38% Router 13055/s 136% 55% 14% 8% 5% -- -1% -1 +0% -34% REEq 13210/s 139% 57% 15% 9% 6% 1% -- - +8% -34% Orig 14430/s 161% 71% 26% 19% 16% 11% 9% +-- -27% SubHash 19881/s 260% 136% 73% 64% 60% 52% 50% 3 +8% --