in reply to Re: Fast file reader
in thread Fast file reader
Actually, on "non broken" platforms, Perl's I/O is more efficient than stdio.h I/O because it knows how to peak inside stdio's internal structures to avoid extra copying of data.
Unfortunately, Linux is a "broken" platform in this regard so Perl's native readline (<>) is 4-times slower than it should be.
I suspect benchmarking this code will show that it is slower than plain <IN> when run on many old-style Unix platforms but faster than <IN> on Linux.
I'd like to encourage effort toward "fixing" Perl's I/O optimizations for Linux and other platforms (written in C).
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Fast file reader
by Malkavian (Friar) on Mar 16, 2001 at 04:02 UTC | |
by Anonymous Monk on Apr 22, 2004 at 15:03 UTC |