Skip to content

Instantly share code, notes, and snippets.

@rssilva
Created April 9, 2013 03:35
Show Gist options
  • Save rssilva/5342763 to your computer and use it in GitHub Desktop.
Save rssilva/5342763 to your computer and use it in GitHub Desktop.
(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