Created
April 9, 2013 03:35
-
-
Save rssilva/5342763 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
(function () { | |
var start = new Date().getTime(); | |
var div = $('#content')[0]; | |
for (var i = 0; i < 1000000; i++) { | |
if (i % 2 === 1) { | |
div.className = ''; | |
} else { | |
div.className = 'display-none'; | |
} | |
} | |
var end = new Date().getTime(); | |
var time = end - start; | |
console.log('Execution time: ' + time); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment