On Jun 21, 2010, at 8:23 AM, Heinz N. Gies wrote: > it would be more or less trivial to make a macro that switches between non > promoting + primitive loop and promoting and boxed loop: > > (defmacro fast [body] > `(let [+# +, *# *, -# -, loop# loop ...] > (binding [+ +', * *', - -', loop loop' ... > +' +#, *' *#,-' +#, loop' loop# ...] > ~...@body))) > ;; NOT TESTED! Just a brainstorming
If the body does anything in new threads, e.g. in a pmap, then they won't be fast (or correct, if you reverse the defaults). I guess this a somewhat unrelated newbie question: aren't there often cases like this where one wants to temporarily rebind something, but across all children threads? Is there some straightforward way to do this that I've missed? -Lee -- Lee Spector, Professor of Computer Science School of Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http://hampshire.edu/lspector/ Phone: 413-559-5352, Fax: 413-559-5438 Check out Genetic Programming and Evolvable Machines: http://www.springer.com/10710 - http://gpemjournal.blogspot.com/ -- 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