Fork me on GitHub
#cljs-dev
<
2018-06-04
>
dnolen14:06:13

@mfikes thanks applied

petterik17:06:17

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.

petterik17:06:28

Gist here with commands to run with clj and cljs.main: https://gist.github.com/petterik/0e0c9bcc4b223c01bbb1442e820ea503

petterik17:06:38

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

petterik18:06:54

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.

petterik18:06:24

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

richiardiandrea23:06:48

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?