In January, there was a discussion about automatic parallelization ( http://groups.google.com/group/clojure/browse_thread/thread/a053fac1235d3820/ - Google doesn't allow me to continue this thread, so I have to open a new one).
I'm interested if anybody has made some progress in this topic? The idea I'm interested in (maybe for project at university) is if it could be possible to speed up a program by computing the parameter values of a function call concurrently. For example, if we have (f param1 param2 param3) then we could compute param1, param2 and param3 each in an own agent. Of course, there are restrictions: - the computations must be free of side effects (any Java code and (de) references disqualify, I guess) - in most cases, it will slowdown the execution, but the runtime could keep track on which positions it was sucessfull and only apply parallelization there in the future) No matter if this really makes sense, my first question is how "side effects" are actually defined in Clojure. This is also important for the "dosync" macro, where no side effects should be used. But what does that mean exactly? And shouldn't there be a way for the compiler to figure out, if there are side effects or not? Of course, Clojure has a problem there because of the tight integration to Java (which is, as I think, one of its greatest features). You can never know what your called Java code does. But perhaps it is at least possible to distinguish between "guaranteed side-effect functions" (if we ignore the "binding" macro which can destroy this, as far as I understand) and "possible side-effect containing functions"? When using "dosync" the compiler could optionally show a warning for the latter ones, but - as mentioned before - also try auto-parallelization for the former ones. Any ideas, papers, experiments I should know about? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---