in reply to Perl's poor disk IO performance
Would be curious if: open($fh,"<:unix",$path) produces further speed improvements past :raw? You didn't post the C code, so I'm not 100% sure that we have an "apples to apples" comparison here - there may be some detail that makes this not quite the same. BTW, are you on a Unix or a Windows platform? I don't think that matters, but it might in some weird way that I don't understand right now.
I've written binary manipulation stuff in Perl before for doing things like concatenating .wav files together. I wouldn't normally be thinking of Perl for a massive amount of binary number crunching, but it can do it! Most of my code involves working with ASCII and huge amounts of time can get spent in the splitting, match global regex code.. I have one app where 30% of the time is spent doing just that. The raw reading/writing to the disk is usually not an issue in my code as there are other considerations that take a lot of time.
Update: see the fine benchmarks from BrowserUk. I appears that :perlio & setting binmode($fh) is the way to go.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl's poor disk IO performance
by BrowserUk (Patriarch) on Apr 30, 2010 at 00:20 UTC | |
by Marshall (Canon) on Apr 30, 2010 at 19:27 UTC |