in reply to RE: is split optimized?
in thread is split optimized?
(relevant code:)Five: 13 wallclock secs (13.39 usr + 0.00 sys = 13.39 CPU) @ +5.15/s (n=69) One: 13 wallclock secs (12.92 usr + 0.01 sys = 12.93 CPU) @ 4 +.87/s (n=63)
While a tad faster, using something besides split (such as a regex) show that split doesn't optimize away the other entries. See my other post on this thread for more benchmark results.One => sub { my ($y) = (split(/\s+/,$testlarge))[0]; }, Five => sub { my $y = split(/\s+/,$testlarge) }
Ciao,
Gryn
|
|---|