genbodev
4/10/2017 - 12:18 PM

Measuring the speed of the script on JS

Measuring the speed of the script on JS

var start = new Date().getTime();
// body script cycle.length
var elapsed = new Date().getTime() - start;

console.log('average ' + elapsed/len + ' ms/column');
console.log('total ' + len + ' columns: ' + elapsed + ' ms');