in reply to Re^18: Why is the execution order of subexpressions undefined?
in thread Why is the execution order of subexpressions undefined?

I don't think that threads scale well compared to declarative parallelism.
In my opinion, the rough comparison between threads and declarative parallelism is that of manual memory allocation and garbage collection.
You can make manual allocation faster and more efficient, but it costs extra for each piece of code you write. With garbage collection, it just works. The nutshell is that using a bunch of threads to gain parallelism is wasteful overhead on a single cpu, and actually holds you back when you have more cpus than threads.
A 'single core' Cell cpu actually has nine cpu cores, and the Cell roadmap for the future goes up to sixty four 'single cores' on a single die. How can you use any kind of explicit threading to deal with 576 cores on a single die? What if it's actually a four socket motherboard with 2304 cores?
Declarative parallelism isn't threads, and it's not coroutines, but it does let your code take advantage of multiple cores to the limit of your algorithm. More detail is in the thread A Fundamental Turn Towards Concurrency on lambda-the-ultimate.org.
-- Shae Erisson
  • Comment on Declarative Parallelism, Re^19: Why is the execution order of subexpressions undefined?

Replies are listed 'Best First'.
Re: Declarative Parallelism, Re^19: Why is the execution order of subexpressions undefined?
by BrowserUk (Patriarch) on Apr 22, 2005 at 21:57 UTC

    That's a very interesting article. Thankyou.

    I agree that explicit threading is not the way of the future. I also think that neither native threads nor "user" threads are either, individually, sufficient to make good use of future architectures. I belive a combination of the two, and transparency is required.

    For why and how, please contact me via the email on my homepage.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco.
    Rule 1 has a caveat! -- Who broke the cabal?