Created
April 20, 2013 08:41
-
-
Save voigt/5425279 to your computer and use it in GitHub Desktop.
Get a benchmark time for a function
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
while (true) { | |
var start = Date.now(); | |
benchmark(); | |
var duration = Date.now() - start; | |
console.log(duration); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment