in reply to Re: Efficiently sorting array by non-alpha strings
in thread Efficiently sorting array by non-alpha strings
I did fix a few typos but my benchmark isn't nearly as sophisticated as yours. I reran the tests using your code and am getting similar results, albeit my rate is much slower :(.
Following BorisZ's comment, I placed the hash setup outside the cmpthese and indeed it is coming out as the speed demon. Interesting, I tried doing the same with the my %bucket line in your code and the performance decreased dramatically. I guess that using local variables provides better performance than globals?
Thanks again for the insights!
-Wm
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Efficiently sorting array by non-alpha strings
by Abigail-II (Bishop) on Feb 20, 2004 at 17:12 UTC |