Let Eduction's Seqable interface optimize for chunked-seqs

Description

When calling seq on an eduction when the source of eduction is a chunked-seq, the returned seq won't use the "chunked functions" to traverse the collection.

Environment

None

Activity

Show:

Petter ErikssonJune 8, 2018 at 8:55 AM

I've experimented with making eduction use chunked-seq optimizations and it's about twice as fast. The same code works with clojure.core/sequence and I see the same performance speed up there as well.

I don't know how we feel about external links but here's a gist with:

  • Code

  • Tests

  • Output from running (-main)

  • One-line commands to test it out with clj and cljs.main

https://gist.github.com/petterik/0e0c9bcc4b223c01bbb1442e820ea503

The code for sequence looks like this:

Details

Assignee

Reporter

Priority

Created June 4, 2018 at 7:25 PM
Updated June 15, 2018 at 10:16 PM