Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Parallelization of multiple nested loops

by roboticus (Chancellor)
on Feb 07, 2018 at 16:33 UTC ( #1208638=note: print w/replies, xml ) Need Help??


in reply to Re: Parallelization of multiple nested loops
in thread Parallelization of multiple nested loops

salva, biosub:

I'd suggest something like:

# customize to suit my @param_space = (0.0, 0.2, 0.4, 0.6, 0.8, 1.0); for my $i (@param_space) { for my $j (@param_space) { ... } }

This clarifies the code a little and might remove a few operations from the optree. It makes it simple to change the distribution (if desired), and you can use more arrays if you want to treat some parameters slightly differently.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208638]
help
Chatterbox?
[choroba]: :-)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2018-02-21 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (281 votes). Check out past polls.

    Notices?