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

Re^4: RFC: Implicit Parallelization Pragma

by hardburn (Abbot)
on Jan 26, 2005 at 14:22 UTC ( #425213=note: print w/ replies, xml ) Need Help??


in reply to Re^3: RFC: Implicit Parallelization Pragma
in thread RFC: Implicit Parallelization Pragma

How about the Schwartzian as an example?

my @sorted = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map {[ $_, substr( $_, 2, 5 ) ]} @list;

The maps can be parellelized, and the sort can, too, if perl (lowercase) implemented it with a parellel sorting algorithm. The second map (in execution order) must come out in correct order--otherwise, why did you even bother sorting? Intrestingly, the first map does not need to come out in order, though there is a problem of letting perl in on this fact.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.


Comment on Re^4: RFC: Implicit Parallelization Pragma
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (16)
As of 2015-07-02 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (45 votes), past polls