Have you looked into work-stealing algorithms? Fork-Join (of which reducers
can take advantage) implements that. The basic idea is that you split your
work into delays (as in clojure.core/delay, called Tasks in Fork-Join)
where convenient in your algorithm and push them onto your work queue. You
then force the delays later in your algorithm when, you need the result.
Meanwhile other workers have the opporunity to compute delays from your
work queue, so that their result is already available when you force them.
The net effect can be pretty optimal parallelism.

I don't know if this answers your question precisely, but it might provide
an angle to think about the problem.

kind regards

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to