Quickest way to a UNIX Date

JavaScript performance comparison

Revision 21 of this test case created by

Preparation code

<script src="http://momentjs.com/downloads/moment.min.js"></script>
    

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Date.now() (ES5.1, IE9+)
Date.now()
pending…
new Date().getTime() (All Browsers)
new Date().getTime()
pending…
+new Date() (All Browsers)
+new Date()
pending…
+new Date (All Browsers)
+new Date
pending…
moment().valueOf()
moment().valueOf()
pending…
+moment()
+moment()
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.

0 Comments