Date.now vs Date.valueOf vs Number(Date) vs Date/1

JavaScript performance comparison

Revision 3 of this test case created

Info

Add new Date()/1 to the existing tests

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Date.now()
Date.now()
pending…
Date.getTime
new Date().getTime()
pending…
Number( new Date)
Number(new Date)
pending…
+new Date()
+new Date()
pending…
new Date()/1
new Date()/1
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment