Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
new Date().toISOString() vs moment.utc().toISOString();
(version: 1)
Comparing performance of:
Moment vs native
Created:
one year 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 newDateObject = moment.utc().toISOString();
native
var dateString = new Date().toISOString();
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:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser/OS:
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Moment
136768.1 Ops/sec
native
2829383.2 Ops/sec
Related benchmarks:
Moment Tests
Moment format vs new Date().toLocaleDateString()
Moment format vs new Date().toISOString, no ms
moment iostring
Moment Tests timestamp
Moment Tests timestamp 2
Moment Tests timestamp 2 millis
Moment UTC Tests
Moment and natvie toISOString()
Comments
Confirm delete:
Do you really want to delete benchmark?