improve execution of kws

This commit is contained in:
Nathan Marz 2015-05-11 14:02:08 -04:00
parent e0bde53fef
commit cd994b10ee

View file

@ -159,11 +159,10 @@
(extend-type clojure.lang.Keyword (extend-type clojure.lang.Keyword
StructurePath StructurePath
;; faster to invoke keyword directly on structure rather than reuse key-select and key-update functions (select* [kw structure next-fn]
(select* [^clojure.lang.Keyword kw structure next-fn] (next-fn (get structure kw)))
(next-fn (kw structure))) (update* [kw structure next-fn]
(update* [^clojure.lang.Keyword kw structure next-fn] (assoc structure kw (next-fn (get structure kw)))
(assoc structure kw (next-fn (kw structure)))
)) ))
(extend-type clojure.lang.AFn (extend-type clojure.lang.AFn