On Fri, 2011-01-07 at 05:22 -0800, Casper Bang wrote:
[ . . . ]
> In C#,thanks to closures, if you determine your for loop has no side-
> effects and needs to go faster, you just use Parallel.For(...) instead
> and the runtime will take care of the rest. That's simple and easy,
> all you need to understand is whether your loop body lends itself to
> parallelization since this is obviously outside the ability of the
> compiler* to magically infer.
> 
> *Here we're talking mainstream imperative Java/C#, not Haskell/ML/
> Clojure/Scala or other experimental languages, AFAIK this is still
> called The Java Posse.

I guess it is all down to what Oracle does about jsr166y and extras166y.
jsr166y is supposed to be in Java 7 and helps a lot, but ParallelArray
(which is what you need for the above functionality) is only in
extra166y which is what is proposed to not to be in Java 7. 

So campaign to get Parallel Arrays into Java 7.

In the meantime you can use GPars (http://gpars.codehaus.org) which can
be used direct from Java even though it is a Groovy-based system. 

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to