Fork me on GitHub

@mfikes thanks applied


Noticed that (seq (eduction ...)) doesn't optimize for when the source to eduction is a chunked-seq. Implemented a version Seqable that does optimize for this case and I've measured a ~1.9x speedup for both clj and cljs for my very few benchmarks.


Gist here with commands to run with clj and cljs.main:


Is this something we're interested in?

Alex Miller (Clojure team)17:06:51

Requires more looking, feel free to file a ticket for clj

Alex Miller (Clojure team)17:06:56

Why do we care about eductions over seqs?

Alex Miller (Clojure team)17:06:56

They’re most useful for reductions over io-based reducibles

Alex Miller (Clojure team)17:06:55

Also seems like we should be aiming to optimize reduce over seqs generally rather than the specific case of eduction


We might not care about eductions over seqs. I just noticed it when benchmarking different ways of doing (first (filter pred coll)). Calling (first (eduction ..)) is something I do now and then though. I like to compose code with eductions, but I mostly use them as sources to into, transduce or reduce. So I understand if we don't care.


The code provided in the gist would also work for the 2-arity sequence call, which may or may not be more interesting.


Hello folks! is ClojureScript core interested in reading the :npm-deps from package.json so that users don't have to duplicate their dependencies in two places?