Created
December 26, 2011 04:06
-
-
Save kylebarrow/1520505 to your computer and use it in GitHub Desktop.
JavaScript perf testing loop
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
var start = new Date(); | |
var count = 1000000; | |
while(count > 0) | |
{ | |
// JS to perf test here | |
count--; | |
} | |
var end = new Date(); | |
console.log("Duration: " + (end-start) + " ms"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment