[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-beginners
Subject: Re: File::Find .. still confused slightly
From: 76.97.132.53
Date: 2017-07-06 1:53:56
Message-ID: 86o9syfhzf.fsf () local ! lan
[Download RAW message or body]
reader@newsguy.com (Harry Putnam) writes:
> What surprised me is the that when I ran them prefaced with the `time'
> utility, I see the sloppy mess I wrote is nearly twice as fast.
I may have found a reason.
in the find sub {}
part you did two returns
return unless -f;
return unless /^\d+$/;
With one commented like so:
# return unless -f;
return unless /^\d+$/;
With that done, my code from OP is consistently about 1 second slower
over those 4.2 million msgs.
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic