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

Revision 27 of this benchmark created by Ray Tiley on


Description

Checking the speed of Moment.js with different options.

Preparation HTML

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

Setup

var preExisting = new Date('2011-09-23T20:40:55.999+0000');

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(preExisting);
ready

Revisions

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