Perl: the Markov chain saw | |
PerlMonks |
Re: PerlIO slower than traditional IO?by Bob9000 (Scribe) |
on Aug 14, 2005 at 21:07 UTC ( [id://483723]=note: print w/replies, xml ) | Need Help?? |
This isn't a problem with PerlIO so much as a serious design flaw in PerlIO::via::MD5. It reads the file one line at a time, forcing PerlIO to call it many times before it completes. Consequently, setting $/ to undef before reading from the handle will make the speeds almost identical, and implementing PerlIO::via::MD5 as a call to &Digest::MD5::addfile makes it faster than your "regular" version.
In Section
Seekers of Perl Wisdom
|
|