Collection hashers should use iterators

Description

In CLJS hash-ordered-coll and hash-unordered-coll currently consume their collections using seq instead of an iterator. Most core collection types have an efficient -iterator implementation which avoids the extra allocations inherent in seq.

Using iterators instead shows a modest performance improvement with larger collections and more frequent iterations; benchmark-runner size (1000) and repetition count (100) shows no perceptible difference on my machine (Ubuntu 18.04 using "Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz")

cljs.benchmark-runner

Environment

None

Activity

Show:
Mike Fikes
May 12, 2019, 2:29 AM

cljs-2931.patch added to Patch Tender

Mike Fikes
October 12, 2018, 4:29 PM

cljs-2931.patch LGTM.

It passes in CI and Canary.

Here are the same three benchmarks, broadened to cover all of the VMs:

Assignee

David Nolen

Reporter

Francis Avila

Labels

Approval

None

Patch

Code

Priority

Minor