Confirmed. I am looking into this. For some reason the call to filter is reflective in alpha 2.
> Could someone else also try the sample code I included to see if they > also experience the same ~10x slowdown for (count (filter ...)) in 1.3 > Alpha 2? > > On Oct 28, 12:34 pm, Btsai <benny.t...@gmail.com> wrote: >> I have some code that counts the elements in a list that map to true >> in a lookup table, looking something like this: >> >> (def lookup-table {1 true, 2 false}) >> (def elements (range 1000000)) >> (count (filter lookup-table elements)) >> >> On my machine, with server mode enabled, the count + filter got ~10 >> times slower when I updated from 1.3 Alpha 1 to 1.3 Alpha 2: >> >> (Alpha 1) >> user=> (time (count (filter lookup-table elements))) >> "Elapsed time: 181.262702 msecs" >> 1 >> >> (Alpha 2) >> user=> (time (count (filter lookup-table elements))) >> "Elapsed time: 2017.744155 msecs" >> 1 >> >> Which is weird because looking up elements in the table did not become >> any slower: >> >> (Alpha 1) >> user=> (time (doseq [x elements] (lookup-table x))) >> "Elapsed time: 159.033341 msecs" >> nil >> >> (Alpha 2) >> user=> (time (doseq [x elements] (lookup-table x))) >> "Elapsed time: 159.965861 msecs" >> nil > > -- > 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