크기가 50,000 개이고 성능 문제 (수 초)가 불충분 한 두 벡터에 대해 요소 단위 작업을 수행하고 있습니다. 다른 데이터 구조를 사용하는 것과 같은 명백한 성능 문제가 있습니까?Clojure 성능, 큰 벡터에 대해 큰 루핑
(defn boolean-compare
"Sum up 1s if matching 0 otherwise"
[proposal-img data-img]
(sum
(map
#(Math/abs (- (first %) (second %)))
(partition 2 (interleave proposal-img data-img)))))
'int-array's에 사용하기위한 array-fiddling (같은 길이의 체크 안함)의 예 : (defn xor-sum [^ ints xs,^ints ys] (areduce xs i ret (int 0)) (체크되지 않은 add ret (bit-xor (aget xs i) (aget ys i)))))) ' –