in reply to Why use <$fh> at all?
Perl 5.8.0, w/PerlIO, Linux 2.4:
$ ./diamond Benchmark: timing 100 iterations of readbig, whilelp... readbig: 10 wallclock secs ( 8.07 usr + 0.29 sys = 8.36 CPU) @ 11 +.96/s (n=100) whilelp: 5 wallclock secs ( 4.79 usr + 0.29 sys = 5.08 CPU) @ 19 +.69/s (n=100) $
PerlIO certainly appears to be a big improvement. Several runs show a scatter of +/- 0.10/sec in the results. My test file was 8000 lines of 65 characters.
After Compline,
Zaxo
|
|---|