Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by marioroy (Prior)
on Apr 17, 2020 at 00:00 UTC ( [id://11115659]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub collatz_seq {
        my $input = shift;
    ...
        $cache[$input] = $result if $input < $max;
        return $result;
    }
    
  2. or download this
    # Intel i7 laptop, Docker Container, Ubuntu + Perlbrew Perl 5.30.1
    
    ...
    collatz3_d.pl 1e7   9.170s  (d) c + reduced loop iterations
    collatz3_e.pl 1e7   7.681s  (e) d + caching less
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-19 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found