Quickest way to a UNIX Date (v20)

Revision 20 of this benchmark created by Geoff Stokes on


Description

Pits ES5.1 Date.now() against backwards-compatible alternatives.

Test runner

Ready to run.

Testing in
TestOps/sec
Date.now() (ES5.1, IE9+)
Date.now()
ready
new Date().getTime() (All Browsers)
new Date().getTime()
ready
+new Date() (All Browsers)
+new Date()
ready
+new Date (All Browsers)
+new Date
ready
Number(new Date()) (All Browsers)
Number(new Date())
ready
Date.parse(new Date()) (All Browsers)
Date.parse(new Date())
ready

Revisions

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