Have Range implement IChunkedSeq

Description

When Clojure's range was converted from a lazy seq to a LongRange in CLJ-1515, LongRange was made to implement IChunkedSeq. It seems that this could also be applicable in ClojureScript, with superficial evidence being that by taking this form

and simply adding a call to vec

dramatically speeds it up. Benchmarks are included below.

Note that Alex Miller recalls that the change in Clojure was rather challenging, with difficulty:
"balancing the perf concerns of reducible, sequence, and chunked sequence traversal (all of which are possible and may even interleave) while also avoiding potential overflow/underflow cases was a surprisingly narrow path"

Environment

None

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

None

Approval

Accepted

Patch

Code and Test

Priority

Major
Configure