Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Optimizing with Caching vs. Parallelizing (MCE::Map)

by marioroy (Prior)
on Apr 06, 2020 at 05:55 UTC ( [id://11115117]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    @output = sort { $b->[1] <=> $a->[1] } @output;
    
    say sprintf('%s : length %s', $_->[0], $_->[1]) for @output[0..19];
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    @long_seqs = sort { $b->[1] <=> $a->[1] } @long_seqs;
    say  "$_->[0] : length $_->[1]" for @long_seqs[0..19];
    
  3. or download this
    use strict;
    use warnings;
    ...
    
    @long_seqs = sort { $b->[1] <=> $a->[1] } @long_seqs;
    say  "$_->[0] : length $_->[1]" for @long_seqs[0..19];
    
  4. or download this
    77031 : length 351
    52527 : length 340
    ...
    56095 : length 322
    80225 : length 320
    81159 : length 320
    
  5. or download this
       Nick's example:  1m32.958s real, 0m56.561s user - no caching
    Laurent's example:  1m33.454s real, 1m00.491s user - no caching
    Laurent's example:  0m18.761s real, 0m20.990s user -    caching
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found