> My guess would be you're seeing the overhead for pmap since the
> (inc 0.1) computation is so cheap.  From the docs for pmap:
>   "Only useful for computationally intensive functions where the time of
>   f dominates the coordination overhead."

I don't think so, as the cheap computation (inc 0.1) is packed into
the long running (dotimes). And it does work for using (inc 0), where
I get a perfect linear speedup. Just by using (inc 0.1) instead of
(inc 0) the speedup is rapidly getting down while the CPU load is next
to the limit.

> Maybe try this with something more expensive to compute?  Also, making
> the result a function of the parameter can't hurt since there's a chance
> the JVM may optimize away the inc of a constant as it stands.

I also would expect the JVM to optimize away something, but for me it
seems it does not, because again in case of (inc 0) everything works
perfect.

The point is:
Why do I get a linear speedup with (inc 0) -> 8 times and not with
(inc 0.1) -> 2 times, while the CPU load is 800% and 700%,
respectively?
__
Johann
--~--~---------~--~----~------------~-------~--~----~
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