JavaScript Measuring Performance with console.time


console.time lets you measure how long it takes for your code to run.

Simple example:

console.time("total time");
for(var i = 0; i<100; i++) {
    console.log('replace this console.log with code');
console.timeEnd("total time");

You can also nest console.time statements.

For more accuracy you must take the average of multiple tests.