clojure icon indicating copy to clipboard operation
clojure copied to clipboard

assoc performance

Open practicalli-johnny opened this issue 5 years ago • 0 comments

The 3-arity version of assoc is usually faster than the var-arg version. On hot paths it may help a bit to use (-> {} (assoc k1 v1) (assoc k2 v2)) vs (assoc {} k1 v1 k2 v2)

#clojure https://t.co/RT1KqhOwRE

practicalli-johnny avatar Dec 21 '20 13:12 practicalli-johnny