4 ms·
My understanding is that it's not just about the parallelism, but about the type of threading model that is used, which makes it extremely composable.
by DNF2 7y ago
My understanding is that it's not just about the parallelism, but about the type of threading model that is used, which makes it extremely composable.
- tomp 7y agoIt's literally just futures. (Still very hard to implement, of course, and in particular IMO this kind of implementation (M-to-N threading) is much better than the async/await implementations) but CS is pretty settled on futures being the "best" model, even C++ has them!)
- DNF2 7y agoMy understanding was that the depth-first scheduling was basically 'new'.
- chrisseaton 7y agoIn my experience most work-stealing schedulers for task parallelism like this are going to be depth-first. I’ve written several myself. Primarily for temporal locality - if you just created a task it’ll be resident in cache.
- gpderetta 7y agoI'm still trying to access the relevant papers, but from bits of discussions here it seems to me that the difference between the Julia scheduler and cilk is that the former will try to distribute sibling leaf tasks among executors enforcing as close as a global depth first view as possible, while cilk does depth first on each executor but different executors will be exploring distinct the problem space branching off as close to the root as possible (due to the steal the oldest ancestor behaviour). It is a compromise between better cross executor cache locality and increased contention I guess.
- gpderetta 7y agoFutures in c++ are really meant for concurrency especially for IO. They currently are way too heavy weight for fine grained parallelism (although there is work ongoing on that). Also futures are about packaging tasks, all the stuff being discussed here is about optimal scheduling which is completely orthogonal.
- deleted 7y ago[deleted]