3 ms·
>For high-level measurements I use good old "new Date().getTime()". One call before, one call after, subtract the former from the latter and log it to the conso
by masklinn 15y ago
>For high-level measurements I use good old "new Date().getTime()". One call before, one call after, subtract the former from the latter and log it to the console.
Why not use `console.time` and `console.timeEnd` for that? They probably have the same resolution as the underlying date object and they're significantly less of a hassle.
- sstephenson 15y agoBecause I didn't know about it :) Great tip!