Comparison of methods for get current timestamp (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Date.now()
const timestamp = Date.now()
ready
new Date().getTime()
const timestamp = new Date().getTime()
ready
+new Date()
const timestamp = +new Date()
ready
Performance
const timestamp = performance.timeOrigin + performance.now()
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.