I tried a few benchmarks in response to discussion around
Big Willy's Frequency Analyzer. The code I tested
and the results can be summarized by:
while ($_ ne '') { $letters{lc chop}++; }
while ($_ ne '') { $letters{lc substr($_,-1)}++; substr($_, -1) = ""; }
I have two questions:
In reply to Benchmarking chop/substr/split by larryl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |