There's more than one way to do things | |
PerlMonks |
Re: Re: Reducing Array Interationsby THRAK (Monk) |
on Aug 16, 2001 at 17:45 UTC ( [id://105367]=note: print w/replies, xml ) | Need Help?? |
This is definately cleaner than my approach, thus why I asked the question (and why I will use it). But I ran some benchmarks on just this section of code (derived from a 260K file) and it's not any faster.
This test case is much larger than most of what I would be passing through it so it's not terribly significant, but I thought your approach would be more efficient. Kind of interesting at least to me. Thanks for your assistance.
Original: Time: 27 wallclock secs (25.88 usr + 0.00 sys = 25.88 CPU) Time: 26 wallclock secs (25.75 usr + 0.00 sys = 25.75 CPU) Time: 27 wallclock secs (25.73 usr + 0.00 sys = 25.73 CPU) Time: 27 wallclock secs (25.88 usr + 0.00 sys = 25.88 CPU) Time: 26 wallclock secs (25.75 usr + 0.00 sys = 25.75 CPU) New: Time: 26 wallclock secs (25.97 usr + 0.00 sys = 25.97 CPU) Time: 26 wallclock secs (26.13 usr + 0.00 sys = 26.13 CPU) Time: 26 wallclock secs (26.39 usr + 0.00 sys = 26.39 CPU) Time: 27 wallclock secs (26.30 usr + 0.00 sys = 26.30 CPU) Time: 27 wallclock secs (26.31 usr + 0.00 sys = 26.31 CPU) -THRAK www.polarlava.com
In Section
Seekers of Perl Wisdom
|
|