clojure
clojure copied to clipboard
assoc performance
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