I played with this some more, and it seems like for accessing an element in a vector, (v idx) is a bit faster than (nth v idx). If you replace this line (line 52 in the gist)...
fl (nth freq-layer layer)] with: fl (freq-layer layer)] ...the total time needed to compute frequencies for all 92 types goes down from 29 seconds to 21 seconds on my machine. On Nov 8, 6:56 am, "Gijs S." <gijsstuur...@gmail.com> wrote: > Indeed I was not using the transients correctly. Transients are not > designed to be bashed in-place. (http://clojure.org/transients) > > The gist is updated with a version that first worked without the > transients and then had the transient operations added. (https:// > gist.github.com/666228) > > The times and analysis still hold. > > -Gijs -- 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