2010/5/18 braver <delivera...@gmail.com>:
> On May 18, 10:27 am, David Nolen <dnolen.li...@gmail.com> wrote:
>> On Tue, May 18, 2010 at 10:18 AM, braver <delivera...@gmail.com> wrote:
>> The documentation is pretty clear about how pmap works. Your work needs to
>> be greater than the coordination overhead. You probably need to batch your
>> work before trying to call pmap.
>
> David -- note that loop outperforms every? by 4x without pmap.  So
> forget pmap, we know it's overhead-y, why does every? lose?

Guesses :

In the iterative solution, loop is optimized for tail cal
In the higher order functions solution, you have a lot of embedded
calls to map function, and also call to every? function. Those
functions produce (and every? consumes) seq objects.

Please note that loop is as functional as the combination of every?
and map. It's just the "iterative" style versus hof style.

-- 
Laurent

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

Reply via email to