On 22 Aug 2010, at 17:48, Belun wrote:
does clojure take advantage of my multicore processor ? if i write a program (not using multiple threads) that is going to take 1 day in a java environment, then will my program run 4 times faster on my 4 core processor if i build it in clojure ?
No. No compiler or run-time system will do automatic parallelization of arbitrary programs for you, at the current state of the art.
Clojure has support mechanisms for parallelization, although for the moment they are rather low-level (futures, for example) or very specific (e.g. pmap). Still, they are probably much simpler to use than whatever Java has to offer. More importantly, writing in a mostly- purely-functional style, which is encouraged by Clojure, vastly increases the chance that your parallel program will actually work. But you still have to do parallelization yourself.
Konrad. -- 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