momentjs vs datejs

JavaScript performance comparison

Revision 10 of this test case created

Info

moment.js and date.js are 2 libraries offering similar functionalities that is lacking in basic javascript.

Results on Chrome: moment.js is lighter, and offers much faster parsing. On the other hand, date.js offers much faster formatting and manipulation.

Preparation code


<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.1.0/moment.min.js"></script>
<script>
  var momentJS = moment();
</script>

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
moment.js parse
moment("2013-06-20T18:00:00", "YYYY-MM-DDTHH:mm");
pending…
DateJS parse
Date.parse("2013-06-20T18:00:00");
pending…
moment.js format
 
pending…
DateJS format
 
pending…
moment.js manipulation
 
pending…
DateJS manipulation
 
pending…
moment.js Overall
 
pending…
DateJS Overall
 
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