Last active
March 26, 2017 00:41
-
-
Save chpill/f41a4785b6cda6806b63699fa3369e56 to your computer and use it in GitHub Desktop.
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
(require '[net.cgrand.xforms :as x]) | |
(defn using-xforms [chunks] | |
(into {} | |
(comp (halt-when error?) | |
cat | |
(x/by-key :a x/count)) | |
chunks)) | |
(using-xforms chunks) | |
=> {0 3330, 1 3330, 2 3330} ;; IT WORKS! | |
(criterium/quick-bench (using-xforms chunks)) | |
" | |
Evaluation count : 1578 in 6 samples of 263 calls. | |
Execution time mean : 409.277676 µs | |
Execution time std-deviation : 42.914476 µs | |
Execution time lower quantile : 387.744354 µs ( 2.5%) | |
Execution time upper quantile : 482.870979 µs (97.5%) | |
Overhead used : 1.481300 ns | |
Found 1 outliers in 6 samples (16.6667 %) | |
low-severe 1 (16.6667 %) | |
Variance from outliers : 30.7015 % Variance is moderately inflated by outliers | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment