Skip to content

Instantly share code, notes, and snippets.

@KushnerMikalai
Created October 29, 2018 10:57
Show Gist options
  • Save KushnerMikalai/57e2c02bbe1ef57636dcf24465abda01 to your computer and use it in GitHub Desktop.
Save KushnerMikalai/57e2c02bbe1ef57636dcf24465abda01 to your computer and use it in GitHub Desktop.
time speed js
var iterations = 1000000;
console.time('Function #1');
for(var i = 0; i < iterations; i++ ){
// YOUR FUNCTION 1
};
console.timeEnd('Function #1');
console.time('Function #2');
for(var i = 0; i < iterations; i++ ){
// YOUR FUNCTION 2
};
console.timeEnd('Function #2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment