2010-03-12から1日間の記事一覧
すごく簡単な初期化のような処理じゃない限りそこまで速度に差はない。 (let [xs (range 1 1000)] (time (dotimes [i 1000] (reduce conj [] xs))) (time (dotimes [i 1000] (persistent! (reduce conj! (transient []) xs))))) ;; ; => ;; "Elapsed time: 1…
すごく簡単な初期化のような処理じゃない限りそこまで速度に差はない。 (let [xs (range 1 1000)] (time (dotimes [i 1000] (reduce conj [] xs))) (time (dotimes [i 1000] (persistent! (reduce conj! (transient []) xs))))) ;; ; => ;; "Elapsed time: 1…