-
-
Save daimajia/dd7bf30f498300fa31e0 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
// http://www.v2ex.com/t/139818#reply90 | |
var start = Date.now(); | |
var sum = 0; | |
for(var i = 0; i <= 1000000000; ++i){ | |
sum += i; | |
} | |
var end = Date.now(); | |
var span = end - start; | |
console.log(span / 1000 + " seconds"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment