A
Size: a a a
A
A
A
(def a "str1")
(def b "str2")
(defn test1
^String [^String a ^String b]
(str a b))
(defn test2
[a b]
(str a b))
(time
(dotimes [_ 1000000]
(.length (test1 a b))))
(time
(dotimes [_ 1000000]
(.length (test2 a b))))
AK
AK
ST
(cons :x [1 2 3])
(cons :x (seq [1 2 3]))
ST
(cons :x [1 2 3])
(cons :x (seq [1 2 3]))
(cons :x (seq [1 2 3]))`в два раза быстрее...
AK
A
сons
все равно вернет списокST
AK
ST
сons
все равно вернет списокA
cons
does not realize second parameterA
AK
ST
cons
does not realize second parameterST
(list :x)
на порядок медленнее, чем '(:x)
ST
(list :x)
на порядок медленнее, чем '(:x)
ST
(list :x)
на порядок медленнее, чем '(:x)
RN