Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by marioroy (Parson)
on Apr 06, 2020 at 05:55 UTC ( #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
Node Status?
node history
Node Type: note [id://11115117]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2020-10-22 07:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (225 votes). Check out past polls.

    Notices?