>> Also, I think the transducer version should always be faster, no matter the size of the source collection (no threshold).
It's a bit more complicated than that, mostly because transducer pipelines require about 2 allocations per step during creation. Also, most of the performance boost from transducers is due to less garbage being created, and some times the heap of the JVM is so large you'll never see much change from switching to transducers. Don't get me wrong, transducers are great and I often default to them over seqs, but in micro-benchmarks like this there's too much in play to always see a 100% performance boost. On Mon, Nov 27, 2017 at 12:55 PM, David Bürgin <dbuer...@gluet.ch> wrote: > Jiacai – > > I saw you updated the gist. Just in case it passed you by: performance > profits from the source collection being reducible. So pouring ‘dataset’ > into a vector beforehand should speed up the processing quite a bit. > > Also, I think the transducer version should always be faster, no matter > the size of the source collection (no threshold). > > > -- > 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 unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.