This was found to be a hot spot when testing some Specter use cases.
Review of common uses of constantly shows that the arity 1 case is the most common use of `constantly` in the wild, so only unrolled to two arguments.
Perf test:
(use 'criterium.core)
(def f (constantly 1))
(bench (dotimes [_ 1000] (f)))
(bench (dotimes [_ 1000] (f 1)))
(bench (dotimes [_ 1000] (f 1 2)))
;; Results:
;; Arity Before After
;; 0 611.455589 ns 607.800747 ns (no change was expected)
;; 1 3.098828 µs 611.116510 ns (~5x improvement)
;; 2 3.508726 µs 620.415032 ns (~5x improvement)
*Patch:* 0001-CLJ-2228-Improve-performance-of-constantly.patch
*Prescreened by:* Alex Miller