3 ms·
From what I remember of how LV works underneath, it's essentially a task stealing system: a bunch of worker threads pulling out clumps of code from a queue and
by throwaway287293 13y ago
From what I remember of how LV works underneath, it's essentially a task stealing system: a bunch of worker threads pulling out clumps of code from a queue and executing them. I don't remember for sure, but I suspect it uses locking underneath to protect the queue. The reason I bring this up is that it wouldn't work very well if your parallelism was very fine-grained.
It's an elegant abstraction but by no means is it unique. Haskell springs to mind as another language with a similarly elegant abstraction for parallelism. I'm necessarily generalizing a bit but I would say that all these "automagical parallelizing" systems suffer from the problem of not working very well unless the granularity of parallelism the runtime was designed for matches the granularity of parallelism that your program has.