Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Windows
Desktop
2 years ago
Benchmark.js
timestamp = Date.now();
4.8M/s
timestamp = performance.now();
3.2M/s
timestamp = new Date().toISOString();
967K/s
View exact numbers
Test name Executions per second
timestamp = Date.now(); 4,768,101 Ops/sec
timestamp = performance.now(); 3,232,396 Ops/sec
timestamp = new Date().toISOString(); 967,030 Ops/sec
Script Preparation code:
Tests: