Skip to content

Commit 66a435e

Browse files
David NolenDavid Nolen
David Nolen
authored and
David Nolen
committedJun 7, 2014
compare old and new hashing strategy in benchmarks
1 parent c10d4f5 commit 66a435e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎benchmark/cljs/benchmark_runner.cljs

+8
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@
215215
(recur (inc i) (conj r (str "foo" i)))
216216
r)))
217217
(simple-benchmark [coll hash-coll-test] (hash-coll coll) 100)
218+
(simple-benchmark [coll hash-coll-test] (hash-ordered-coll coll) 100)
219+
(def hash-imap-test
220+
(loop [i 0 r {}]
221+
(if (< i 1000)
222+
(recur (inc i) (conj r [(keyword (str "foo" i)) i]))
223+
r)))
224+
(simple-benchmark [coll hash-imap-test] (hash-imap coll) 100)
225+
(simple-benchmark [coll hash-imap-test] (hash-unordered-coll coll) 100)
218226
(simple-benchmark [coll pmap] (:f0 coll) 1000000)
219227
(simple-benchmark [coll pmap] (get coll :f0) 1000000)
220228
(simple-benchmark [coll pmap] (-lookup coll :f0 nil) 1000000)

0 commit comments

Comments
 (0)
Please sign in to comment.