Scala 2.9.0 final
scala-lang.org
scala-lang.org
//Uses 4 threads
(1 to 4).par.foreach(x => /*some long computation*/ }
I'd love to see how other languages can do it more tersely with their standard libraries. from multiprocessing import Pool
p = Pool(4) # 4 worker threads
p.map(somefunc, someiter)
Not sure if this is apples-to-apples. Regardless, I'm always skeptical of the behavior of threaded code, even if it's embarrassingly parallel stuff that is divided among workers.using the standard Control.Parallel.Strategies library (use rwhnf instead of rseq unless you are using v3).
What?
That help? ;-)
THAT part of it I hate; we, as programmers, often rely far too heavily and broadly on mapping what we see to what it means. Call stuff what it is.
so yes, it probably is possible to answer this question to some degree if you've been watching scala grow. i haven't, which is why i asked.