note
rbi
The benchmark result is confirmed for better performance of [substr] in the test above.<br>
I've put <code>$count = 100</code> and reduced the input file size. Now I don't get any warning, the improvement with method Three is evaluated to be about 25%:<br>
<code>
Benchmark: timing 100 iterations of Method One, Method Three, Method Two...
Method One: 7 wallclock secs ( 7.60 usr + 0.11 sys = 7.71 CPU)
Method Two: 8 wallclock secs ( 7.83 usr + 0.11 sys = 7.94 CPU)
Method Three: 6 wallclock secs ( 5.82 usr + 0.10 sys = 5.92 CPU)
</code>
About the benchmark... I felt more confortable with about 40 CPU seconds, even if there was a warning. With repeated iterations I think some time is taken by the call, while one call with a big file is better focussing on the array extraction. But it is just my feeling... :) I'd better study the Benchmark routines to evaluate this<br>
ciao<br>
Roberto
61453
61560