Created
June 27, 2017 05:13
-
-
Save jshvarts/801bd28c439098a3f88cebef3c824146 to your computer and use it in GitHub Desktop.
measureTimeMillis of forEach
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
val forEachMillisEllapsed = measureTimeMillis { | |
(0..10_000_000).forEach { | |
if (it % 2 == 0) { | |
// do something | |
} | |
} | |
} | |
println("forEachMillisEllapsed: $forEachMillisEllapsed") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment