Clojurescript Benchmark Times
50Ply Blog
GitHub Source
v8 Data
spidermonkey Data
javascriptcore Data
TwitterBuzz Compile Time
TwitterBuzz Gzipped Size
[x 1] (identity x) 1000000 iters
[coll (seq arr)] (ci-reduce coll + 0) 1 iters
[coll (seq arr)] (ci-reduce coll sum 0) 1 iters
[coll arr] (array-reduce coll + 0) 1 iters
[coll arr] (array-reduce coll sum 0) 1 iters
[coll []] (instance? PersistentVector coll) 1000000 iters
[coll (list 1 2 3)] (satisfies? ISeq coll) 1000000 iters
[coll [1 2 3]] (satisfies? ISeq coll) 1000000 iters
[coll (list 1 2 3)] (first coll) 1000000 iters
[coll (list 1 2 3)] (-first coll) 1000000 iters
[coll (list 1 2 3)] (rest coll) 1000000 iters
[coll (list 1 2 3)] (-rest coll) 1000000 iters
[] (list) 1000000 iters
[] (list 1 2 3) 1000000 iters
[] [] 1000000 iters
[] [1 2 3] 1000000 iters
[coll [1 2 3]] (transient coll) 100000 iters
[coll [1 2 3]] (nth coll 0) 1000000 iters
[coll [1 2 3]] (-nth coll 0) 1000000 iters
[coll [1 2 3]] (conj coll 4) 1000000 iters
[coll [1 2 3]] (-conj coll 4) 1000000 iters
[coll [1 2 3]] (seq coll) 1000000 iters
[coll (seq [1 2 3])] (first coll) 1000000 iters
[coll (seq [1 2 3])] (-first coll) 1000000 iters
[coll (seq [1 2 3])] (rest coll) 1000000 iters
[coll (seq [1 2 3])] (-rest coll) 1000000 iters
[coll (seq [1 2 3])] (next coll) 1000000 iters
[] (reduce conj [] (range 40000)) 10 iters
[coll (reduce conj [] (range (+ 32768 32)))] (conj coll :foo) 100000 iters
[coll (reduce conj [] (range 40000))] (assoc coll 123 :foo) 100000 iters
[coll (reduce conj [] (range (+ 32768 33)))] (pop coll) 100000 iters
[coll (take 100000 (iterate inc 0))] (reduce + 0 coll) 1 iters
[coll (range 1000000)] (reduce + 0 coll) 1 iters
[coll (into [] (range 1000000))] (reduce + 0 coll) 1 iters
[coll (into [] (range 1000000))] (apply + coll) 1 iters
[coll {:foo 1, :bar 2}] (get coll :foo) 1000000 iters
[coll {:foo 1, :bar 2}] (-lookup coll :foo nil) 1000000 iters
[coll {:foo 1, :bar 2}] (:foo coll) 1000000 iters
[coll (Foo. 1 2)] (:bar coll) 1000000 iters
[coll {:foo 1, :bar 2}] (assoc coll :baz 3) 100000 iters
[coll {:foo 1, :bar 2}] (assoc coll :foo 2) 100000 iters
[key :f0] (hash key) 100000 iters
[coll {:foo 1, :bar 2}] (loop [i 0 m coll] (if (< i 100000) (recur (inc i) (assoc m :foo 2)) m)) 1 iters
[coll pmap] (:f0 coll) 1000000 iters
[coll pmap] (get coll :f0) 1000000 iters
[coll pmap] (-lookup coll :f0 nil) 1000000 iters
[coll pmap] (assoc coll :g0 32) 1000000 iters
[coll cljs.core.PersistentHashMap/EMPTY] (assoc coll :f0 1) 1000000 iters
[] #{} 100000 iters
[] #{1 2 3} 100000 iters
[coll #{1 2 3}] (conj coll 4) 100000 iters
[coll (range 500000)] (reduce + coll) 1 iters
[s "{:foo [1 2 3]}"] (reader/read-string s) 1000 iters
[m {:foo [1 2 {:bar {3 :a, 4 #{:c :b :d :e}}}]}] (pr-str m) 1000 iters
[r (range 1000000)] (last r) 1 iters
[r r] (last r) 1 iters
[r r] (last r) 1 iters