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

Revision 9 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Date.now()
Date.now()
ready
new Date().getTime()
new Date().getTime()
ready
+new Date
+new Date
ready
parentheses 1
(new Date).getTime()
ready
parentheses 2
(new Date()).getTime()
ready
valueof
new Date().valueOf()
ready

Revisions

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