Clojurians
#cljs-dev
<
2018-10-10
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

favila22:10:54

quick comparison shows some benefit

favila22:10:24

BEFORE (seqs)
[coll hash-coll-test], (or (== (hash-ordered-coll coll) -1266761014) (throw (js/Error. "bad"))), 1000 runs, 2385 msecs
[coll hash-imap-test], (or (== (hash-unordered-coll coll) -897742717) (throw (js/Error. "bad"))), 1000 runs, 7538 msecs
[coll hash-imap-int-test], (or (== (hash-unordered-coll coll) 1787591846) (throw (js/Error. "bad"))), 1000 runs, 8392 msecs


AFTER (iterators)
[coll hash-coll-test], (or (== (hash-ordered-coll coll) -1266761014) (throw (js/Error. "bad"))), 1000 runs, 1877 msecs
[coll hash-imap-test], (or (== (hash-unordered-coll coll) -897742717) (throw (js/Error. "bad"))), 1000 runs, 5829 msecs
[coll hash-imap-int-test], (or (== (hash-unordered-coll coll) 1787591846) (throw (js/Error. "bad"))), 1000 runs, 6828 msecs

favila22:10:46

using d8 on an i7

favila22:10:52

these are 10000-item collections; on 1000-item collections at 100 iterations (what benchmark-runner uses) there's no difference, at least on my machine