File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 158158(simple-benchmark [coll {'foo 1 'bar 2 }] (-lookup coll 'foo nil ) 1000000 )
159159(simple-benchmark [coll {:foo 1 :bar 2 }] (:foo coll) 1000000 )
160160(simple-benchmark [coll {'foo 1 'bar 2 }] ('foo coll) 1000000 )
161+ (let [kw :foo
162+ sym 'foo]
163+ (simple-benchmark [coll {:foo 1 :bar 2 }] (kw coll) 1000000 )
164+ (simple-benchmark [coll {'foo 1 'bar 2 }] (sym coll) 1000000 ))
161165(defrecord Foo [bar baz])
162166(simple-benchmark [coll (Foo. 1 2 )] (:bar coll) 1000000 )
163167(simple-benchmark [coll {:foo 1 :bar 2 }] (assoc coll :baz 3 ) 100000 )
176180 (recur (inc i) (assoc m 'foo 2 ))
177181 m))
178182 1 )
183+ (println )
184+
179185(println " ;;; persistent hash maps" )
180186(def pmap (into cljs.core.PersistentHashMap/EMPTY
181187 [[:a 0 ] [:b 1 ] [:c 2 ] [:d 3 ] [:e 4 ] [:f 5 ] [:g 6 ] [:h 7 ]
You can’t perform that action at this time.
0 commit comments