Created
January 2, 2016 06:04
-
-
Save noisesmith/8752dba8efde182852e4 to your computer and use it in GitHub Desktop.
comparing speed of making map entries from lists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (crit/bench (into {} (map vec '((a 1) (b 2))))) | |
Evaluation count : 59832780 in 60 samples of 997213 calls. | |
Execution time mean : 1.021592 µs | |
Execution time std-deviation : 17.617726 ns | |
Execution time lower quantile : 990.161200 ns ( 2.5%) | |
Execution time upper quantile : 1.053298 µs (97.5%) | |
Overhead used : 1.858366 ns | |
nil | |
user=> (crit/bench (reduce #(conj % (vec %2)) {} '((a 1) (b 2)))) | |
Evaluation count : 147289800 in 60 samples of 2454830 calls. | |
Execution time mean : 406.120723 ns | |
Execution time std-deviation : 6.871200 ns | |
Execution time lower quantile : 393.776136 ns ( 2.5%) | |
Execution time upper quantile : 420.426949 ns (97.5%) | |
Overhead used : 1.858366 ns | |
nil | |
user=> (crit/bench (into {} (map vec) '((a 1) (b 2)))) | |
Evaluation count : 119331360 in 60 samples of 1988856 calls. | |
Execution time mean : 502.194995 ns | |
Execution time std-deviation : 9.020397 ns | |
Execution time lower quantile : 489.470212 ns ( 2.5%) | |
Execution time upper quantile : 520.309515 ns (97.5%) | |
Overhead used : 1.858366 ns | |
Found 1 outliers in 60 samples (1.6667 %) | |
low-severe 1 (1.6667 %) | |
Variance from outliers : 7.7728 % Variance is slightly inflated by outliers | |
nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment