in reply to Which is more faster? While or tr///
I would expect tr/// to be more fasterest. However, if it really matters you should write some code to benchmark the alternatives using Benchmark.
The real question though is: "Does it actually matter?". Unless the code fragment has been identified using a profiler as the time hog in code that is running too slowly to achieve some particular goal, write the fragment in the way that seems clearest and easiest to maintain.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Which is more faster? While or tr///
by tej (Scribe) on Feb 01, 2011 at 06:53 UTC |