That's excellent. Thank you everyone. Maybe someone could compile all these "let's speed up this clojure code" threads and put it somewhere as a valuable resource we could point to when things like this come up again?
sincerely, --Robert McIntyre On Sun, Jan 30, 2011 at 1:01 PM, David Nolen <dnolen.li...@gmail.com> wrote: > On Sat, Jan 29, 2011 at 10:37 AM, GrumpyLittleTed > <grumpylittle...@gmail.com> wrote: >> >> Part of the difference (under 1.2) is due to the (substantial) >> overhead of accessing the buffer-size var on every iteration. >> >> I ran a quick check and using David's version of the code result >> averaged 17.2ms. Just changing buffer-size to a local with using (let >> [buffer-size (int 1920000)]...) the time dropped to an average 3.4ms. > > Yes, putting buffer-size in a let makes the performance in 1.3.0 identical > to Java with long loop arithmetic. > David > > -- > 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 -- 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