"Date.now()" vs "+new Date()" vs "new Date().getTime()" (v9)

Revision 9 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Date.now()
console.log(Date.now())
ready
+new Date()
console.log(+new Date())
ready
new Date().getTime()
console.log(new Date().getTime())
ready
new Date().toISOString()
console.log(new Date().toISOString())
ready

Revisions

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