Make PersistentHashSet implement IReduce

Description

This improves speed of many reduce based operations on set which were falling back to seq-reduce, including code in `clojure.set` namespace such as `clojure.set/union` and `(into [] some-set)`.

I've included a few benchmarks I performed using `simple-benchmark` in a JavascriptCore environment (Planck REPL)

Environment

None

Attachments

4

Activity

Show:

Rohit Aggarwal July 21, 2016 at 9:35 PM

I think the code currently is faithful to Clojure's implementation of PersistentHashSet. So any change from that would probably require more thought and/or history.

Also someone else also raised a similar issue on ClojureScript mailing list.

Details

Assignee

Reporter

Patch

Code

Priority

Created July 21, 2016 at 1:34 PM
Updated July 21, 2016 at 9:35 PM