in reply to Re^2: Speed reading (files)
in thread Speed reading (files)
The advantage of "slurping" is that it works with ttys. I don't think -s does.
Also, is read guaranteed to return the number of bytes requested (if the file is big enough)? sysread isn't.
As an aside, wouldn't read FILE, my $data, $MAX_FILE_SIZE; be faster than using -s, especially on smaller files? I guess you have to find an acceptable $MAX_FILE_SIZE (in Config.pm, maybe???)
By the way, I'm not suprised that read is as fast or faster than "slurping". Why wouldn't it be?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Speed reading (files)
by BrowserUk (Patriarch) on Aug 05, 2005 at 04:30 UTC | |
by ikegami (Patriarch) on Aug 05, 2005 at 05:12 UTC | |
by BrowserUk (Patriarch) on Aug 05, 2005 at 05:23 UTC | |
by kwaping (Priest) on Aug 05, 2005 at 14:49 UTC | |
by BrowserUk (Patriarch) on Aug 05, 2005 at 14:58 UTC | |
|