Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Performant Path Iteration

by learnedbyerror (Monk)
on Apr 23, 2019 at 04:18 UTC ( [id://1232888]=note: print w/replies, xml ) Need Help??


in reply to Re: Performant Path Iteration
in thread Performant Path Iteration

Karl, good catch. Given the statistics of the corpus that I use (~ 350 directories compare to ~ 65,000 files), I didn't expect much difference, but I did get a surprise. Adding $rule->file made PIR (both iter and iter_fast) much slower than the alternatives! (FYI, this is using the Benchmark::Forking version of the program).

                  Rate  PIR PIR fast File::Find perl readdir find pipe iter find pipe
PIR            0.622/s   --     -36%       -67%         -77%           -88%      -89%
PIR fast       0.975/s  57%       --       -48%         -64%           -82%      -83%
File::Find      1.89/s 205%      94%         --         -31%           -64%      -67%
perl readdir    2.74/s 342%     181%        45%           --           -48%      -53%
find pipe iter  5.32/s 757%     446%       181%          94%             --       -8%
find pipe       5.80/s 833%     495%       206%         111%             9%        --

Cheers, lbe

Replies are listed 'Best First'.
Re^3: Performant Path Iteration
by karlgoethebier (Abbot) on Apr 23, 2019 at 16:21 UTC
    "...much slower than the alternatives..."

    I'm sorry to hear this. Too bad. By instinct i expected the contrary. As salva wrote: "...the bottleneck is going to be the disk I/O...maybe the order used to traverse the file system ...could have some influence." Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1232888]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-24 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found