Skip to content

Commit 1fa173a

Browse files
committed
wicked fast
1 parent ff59e76 commit 1fa173a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

benchmark/cljs/benchmark_runner.cljs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
(simple-benchmark [coll "foobar"] (nth coll 2) 1000000)
4141
(println)
4242

43+
(defprotocol IFoo (foo [x]))
44+
45+
(println ";;; cloning & specify")
46+
(simple-benchmark [coll [1 2 3]] (clone coll) 1000000)
47+
(simple-benchmark [coll [1 2 3]] (specify coll IFoo (foo [_] :bar)) 1000000)
48+
(println)
49+
4350
(println ";;; list ops")
4451
(simple-benchmark [coll (list 1 2 3)] (first coll) 1000000)
4552
(simple-benchmark [coll (list 1 2 3)] (-first coll) 1000000)

0 commit comments

Comments
 (0)