develooper Front page | perl.perl6.internals | Postings from October 2005

Re: About multithreading

Thread Previous
Leopold Toetsch
October 1, 2005 15:07
Re: About multithreading
Message ID:

On Oct 1, 2005, at 22:20, Martin D Kealey wrote:

> So can we look towards having things like "map" and "grep" be parallel 
> (or
> at least unordered) by default?

I don't think so. First and foremost, these functions produce ordered 
results, that's the Perl semantics of it. Second, while we can for sure 
do some multithreading, if we are waiting for IO or such, it's hard for 
pure computations. Kicking off more threads has it's cost too and it's 
only worth the effort, if the computation is taking a lot of time (or 
CPU cycles). But that's a thing Parrot really doesn't know in advance.

That said, it's unlikely that autothreading w/o any user hints will 
happen soon.

> -Martin


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About