larryl has asked for the wisdom of the Perl Monks concerning the following question:
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:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Benchmarking chop/substr/split
by Albannach (Monsignor) on Mar 17, 2001 at 01:14 UTC | |
by larryl (Monk) on Mar 17, 2001 at 01:19 UTC | |
|
(tye)Re: Benchmarking chop/substr/split
by tye (Sage) on Mar 17, 2001 at 01:34 UTC | |
by larryl (Monk) on Mar 17, 2001 at 02:15 UTC | |
by tye (Sage) on Mar 17, 2001 at 02:19 UTC | |
|
Re: Benchmarking chop/substr/split
by MeowChow (Vicar) on Mar 17, 2001 at 13:55 UTC | |
|
Re: Benchmarking chop/substr/split
by larryl (Monk) on Mar 17, 2001 at 02:58 UTC |