Skip to content

Commit cfdc0e3

Browse files
committed
update vector construction benchmarks to include vec
1 parent 926f691 commit cfdc0e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

benchmark/cljs/benchmark_runner.cljs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@
6060

6161
(println ";;; vector ops")
6262
(simple-benchmark [] [] 1000000)
63-
(simple-benchmark [] [1 2 3] 1000000)
64-
(simple-benchmark [] (vector 1) 1000000)
63+
(simple-benchmark [[a b c] (take 3 (repeatedly #(rand-int 10)))] (-count [a b c]) 1000000)
64+
(simple-benchmark [[a b c] (take 3 (repeatedly #(rand-int 10)))] (-count (vec #js [a b c])) 1000000)
65+
(simple-benchmark [[a b c] (take 3 (repeatedly #(rand-int 10)))] (-count (vector a b c)) 1000000)
6566
(simple-benchmark [coll [1 2 3]] (transient coll) 100000)
6667
(simple-benchmark [coll [1 2 3]] (nth coll 0) 1000000)
6768
(simple-benchmark [coll [1 2 3]] (-nth coll 0) 1000000)

0 commit comments

Comments
 (0)