Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Moment format vs new Date().toISOString, no ms
(version: 0)
Comparing performance of:
Moment vs native
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.rawgit.com/moment/moment/2.7.0/moment.js"></script> <script src="https://cdn.rawgit.com/moment/moment-timezone/0.2.2/builds/moment-timezone-with-data.js"></script></script>
Script Preparation code:
var dateObject = new Date('2016-11-03T12:00:00Z'); var timezone = 'Australia/Perth'; var format = 'YYYY-MM-DDTHH:mm:ss';
Tests:
Moment
var dateString = moment().format();
native
var newDateObject = new Date().toISOString().replace(/\.\d{3}/, '')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Moment
native
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
9 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser/OS:
Chrome 138 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Moment
1564422.0 Ops/sec
native
2158877.8 Ops/sec
Related benchmarks:
Moment Tests
Moment format vs new Date().toLocaleDateString()
Moment Date vs string
Moment UTC Tests
Comments
Confirm delete:
Do you really want to delete benchmark?