Created
October 22, 2013 15:32
-
-
Save mishok13/7102820 to your computer and use it in GitHub Desktop.
LOL @ COUNT
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> (def s (apply str (repeat 100 "a"))) | |
#'user/s | |
user> (bench/quick-bench (count s)) | |
WARNING: Final GC required 2082.410405844158 % of runtime | |
Evaluation count : 8685690 in 6 samples of 1447615 calls. | |
Execution time mean : 67.822779 ns | |
Execution time std-deviation : 1.770044 ns | |
Execution time lower quantile : 65.381948 ns ( 2.5%) | |
Execution time upper quantile : 69.642259 ns (97.5%) | |
Overhead used : 2.812543 ns | |
nil | |
user> | |
user> (defn len [^String s] (.length s)) | |
#'user/len | |
user> (bench/quick-bench (len s)) | |
WARNING: Final GC required 1542.204593526074 % of runtime | |
Evaluation count : 45887352 in 6 samples of 7647892 calls. | |
Execution time mean : 11.174775 ns | |
Execution time std-deviation : 0.501435 ns | |
Execution time lower quantile : 10.569196 ns ( 2.5%) | |
Execution time upper quantile : 11.769903 ns (97.5%) | |
Overhead used : 2.812543 ns | |
nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment