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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.