Skip to content

Commit

Permalink
wicked fast
Browse files Browse the repository at this point in the history
  • Loading branch information
swannodette committed Dec 31, 2013
1 parent ff59e76 commit 1fa173a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions benchmark/cljs/benchmark_runner.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
(simple-benchmark [coll "foobar"] (nth coll 2) 1000000)
(println)

(defprotocol IFoo (foo [x]))

(println ";;; cloning & specify")
(simple-benchmark [coll [1 2 3]] (clone coll) 1000000)
(simple-benchmark [coll [1 2 3]] (specify coll IFoo (foo [_] :bar)) 1000000)
(println)

(println ";;; list ops")
(simple-benchmark [coll (list 1 2 3)] (first coll) 1000000)
(simple-benchmark [coll (list 1 2 3)] (-first coll) 1000000)
Expand Down

0 comments on commit 1fa173a

Please sign in to comment.