Skip to content

Instantly share code, notes, and snippets.

@siscia
Created March 15, 2013 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siscia/5172981 to your computer and use it in GitHub Desktop.
Save siscia/5172981 to your computer and use it in GitHub Desktop.
parallel-colt-matrix.vector> (ns parallel-colt-matrix.matrix)
nil
parallel-colt-matrix.matrix> (use 'criterium.core)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e1 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e1 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add a b))))
WARNING: Final GC required 28.23080534636936 % of runtime
Evaluation count : 84 in 6 samples of 14 calls.
Execution time mean : 7.410858 ms
Execution time std-deviation : 131.006496 us
Execution time lower quantile : 7.198547 ms ( 2.5%)
Execution time upper quantile : 7.544169 ms (97.5%)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e2 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e2 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add a b))))
WARNING: Final GC required 26.61596397456013 % of runtime
Evaluation count : 84 in 6 samples of 14 calls.
Execution time mean : 7.757237 ms
Execution time std-deviation : 153.189498 us
Execution time lower quantile : 7.520283 ms ( 2.5%)
Execution time upper quantile : 7.919927 ms (97.5%)
Found 2 outliers in 6 samples (33.3333 %)
low-severe 1 (16.6667 %)
low-mild 1 (16.6667 %)
Variance from outliers : 13.8889 % Variance is moderately inflated by outliers
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e3 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e3 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add a b))))
WARNING: Final GC required 29.176363273639126 % of runtime
Evaluation count : 54 in 6 samples of 9 calls.
Execution time mean : 11.570799 ms
Execution time std-deviation : 205.472920 us
Execution time lower quantile : 11.225575 ms ( 2.5%)
Execution time upper quantile : 11.748068 ms (97.5%)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e4 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e4 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add a b))))
WARNING: Final GC required 26.429207302671433 % of runtime
Evaluation count : 12 in 6 samples of 2 calls.
Execution time mean : 55.359539 ms
Execution time std-deviation : 1.018748 ms
Execution time lower quantile : 54.272888 ms ( 2.5%)
Execution time upper quantile : 56.518572 ms (97.5%)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e5 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e5 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add a b))))
WARNING: Final GC required 3.639545761187119 % of runtime
Evaluation count : 6 in 6 samples of 1 calls.
Execution time mean : 810.811514 ms
Execution time std-deviation : 13.052177 ms
Execution time lower quantile : 790.272899 ms ( 2.5%)
Execution time upper quantile : 820.274532 ms (97.5%)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e6 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e6 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add a b))))
Evaluation count : 6 in 6 samples of 1 calls.
Execution time mean : 7.200011 sec
Execution time std-deviation : 158.939490 ms
Execution time lower quantile : 7.001870 sec ( 2.5%)
Execution time upper quantile : 7.351139 sec (97.5%)
nil
;;; Using mutation
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e1 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e1 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add! a b))))
WARNING: Final GC required 28.171696886597854 % of runtime
Evaluation count : 156 in 6 samples of 26 calls.
Execution time mean : 4.165244 ms
Execution time std-deviation : 69.404065 us
Execution time lower quantile : 4.107300 ms ( 2.5%)
Execution time upper quantile : 4.274571 ms (97.5%)
Found 1 outliers in 6 samples (16.6667 %)
low-severe 1 (16.6667 %)
Variance from outliers : 13.8889 % Variance is moderately inflated by outliers
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e2 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e2 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add! a b))))
WARNING: Final GC required 29.43092943047282 % of runtime
Evaluation count : 138 in 6 samples of 23 calls.
Execution time mean : 4.499148 ms
Execution time std-deviation : 114.451167 us
Execution time lower quantile : 4.387517 ms ( 2.5%)
Execution time upper quantile : 4.667498 ms (97.5%)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e3 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e3 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add! a b))))
WARNING: Final GC required 28.971180902930932 % of runtime
Evaluation count : 90 in 6 samples of 15 calls.
Execution time mean : 7.095075 ms
Execution time std-deviation : 265.927606 us
Execution time lower quantile : 6.796744 ms ( 2.5%)
Execution time upper quantile : 7.406436 ms (97.5%)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e4 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e4 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add! a b))))
WARNING: Final GC required 24.35361934594409 % of runtime
Evaluation count : 24 in 6 samples of 4 calls.
Execution time mean : 32.181274 ms
Execution time std-deviation : 1.402641 ms
Execution time lower quantile : 30.730812 ms ( 2.5%)
Execution time upper quantile : 33.731389 ms (97.5%)
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e5 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e5 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add! a b))))
WARNING: Final GC required 12.07620806398484 % of runtime
Evaluation count : 6 in 6 samples of 1 calls.
Execution time mean : 265.932661 ms
Execution time std-deviation : 22.887072 ms
Execution time lower quantile : 235.187874 ms ( 2.5%)
Execution time upper quantile : 292.439534 ms (97.5%)
Found 1 outliers in 6 samples (16.6667 %)
low-severe 1 (16.6667 %)
Variance from outliers : 15.6900 % Variance is moderately inflated by outliers
nil
parallel-colt-matrix.matrix> (let [a (get-matrix (vec (partition 10 (take 1e6 (repeatedly #(Math/random))))))
b (get-matrix (vec (partition 10 (take 1e6 (repeatedly #(Math/random))))))]
(quick-bench (dotimes [i 1e3] (matrix-add! a b))))
WARNING: Final GC required 1.4374454595042572 % of runtime
Evaluation count : 6 in 6 samples of 1 calls.
Execution time mean : 2.337287 sec
Execution time std-deviation : 47.228054 ms
Execution time lower quantile : 2.287044 sec ( 2.5%)
Execution time upper quantile : 2.398571 sec (97.5%)
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment