Date vs Moment.js with(out) format (v25)

Revision 25 of this benchmark created by IcanDivideBy0 on


Description

Checking the speed of Moment.js with different options.

Preparation HTML

<script src="https://rawgithub.com/timrwood/moment/2.0.0/moment.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Date
new Date('2011-09-23T20:40:55.999+0000');
ready
Moment.js without format
moment('2011-09-23T20:40:55.999+0000');
ready
Moment.js with format
moment('2011-09-23T20:40:55.999+0000',"YYYY-MM-DDTHH:mm:ss.SSSZ");
ready
Moment.js without format with input date
moment(new Date('2011-09-23T20:40:55.999+0000'));
ready

Revisions

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