On 2/4/2011 3:37 PM, Uri Guttman wrote:
now, depending on how large the file is, slurping it may be faster than
reading it line by line (larger files will win more). the reason is
perl's stream i/o is slower than a single slurp.
Slurping is fun, but only works if you can fit the file in memory. The
moment you run into a too-large file, that approach fails hard.
On the other hand, I've gotten excellent performance out of while()
{sysread(); process();} on multi-GB files, so I'm definitely with you on
the slowdown in <FH> calls.
-Conor
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm