日归档:2016年4月6日

console.time & console.timeEnd

The console.time and console.timeEnd methods allow developers to time any routine and get a duration in milliseconds. Since JavaScript performance is becoming increasingly important, it’s good to know basic techniques for benchmarking routines. One of the most basic benchmarking tools is console.time with console.timeEnd.

console.time starts the time and console.timeEnd stops the timer and spits out the duration: 继续阅读 →

发表在 研发 | 标签为 | 留下评论