Since I'm assuming all the other posters were running under a unix of some sort, and though it might well make a difference, here's some numbers for win32 (win xp, perl 5.6.1, ActiveState build 630):
D:\Documents and Settings\James\Desktop>perl timereads.pl Benchmark: running join, slurp, sys, while, each for at least 5 CPU se +conds... join: 6 wallclock secs ( 3.92 usr + 1.33 sys = 5.25 CPU) @ 28 +23.36/s (n =14817) slurp: 5 wallclock secs ( 2.39 usr + 2.88 sys = 5.28 CPU) @ 58 +13.53/s (n =30678) sys: 5 wallclock secs ( 0.01 usr + 5.06 sys = 5.07 CPU) @ 11 +.25/s (n=5 7) while: 5 wallclock secs ( 4.03 usr + 1.28 sys = 5.31 CPU) @ 28 +34.21/s (n =15044) Rate sys join while slurp sys 11.2/s -- -100% -100% -100% join 2823/s 24998% -- -0% -51% while 2834/s 25095% 0% -- -51% slurp 5814/s 51579% 106% 105% --
(I used D:\WINXP\system32\oembios.bin (12.5 MB, and a significantly lower proportion of newlines.), and "at least 5 cpu seconds" of time, so these numbers have slightly different bases then belg4mit's.)
Note how terribly sys does in my comparisigns. These are completely different results, in essence, which confuses me a lot.
This is rapidly getting offtopic, but does anybody have a clue why?
TACCTGTTTGAGTGTAACAATCATTCGCTCGGTGTATCCATCTTTG ACACAATGAATCTTTGACTCGAACAATCGTTCGGTCGCTCCGACGCIn reply to Re: Re: Reading entire file into scalar: speed differences?
by theorbtwo
in thread Reading entire file into scalar: speed differences?
by theguvnor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |