Skip to content

Instantly share code, notes, and snippets.

@cballou
Created March 25, 2012 13:23
Show Gist options
  • Save cballou/2193754 to your computer and use it in GitHub Desktop.
Save cballou/2193754 to your computer and use it in GitHub Desktop.
Optimizing (and Debugging) Javascript With Firebug
console.time();
var str = '';
for (var i = 0; i < 1000; i++) {
str += i;
}
console.timeEnd();
console.profile();
for (var i = 0; i &lt; 1000; i++) {
testFunction();
}
console.profileEnd();
function testFunction() {
// dummy function
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment