Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
moment(string) vs moment(new Date(string)) vs new Date(string)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
new Date()
18.6M/s
Date() moment date
3.5M/s
String moment date
1.7M/s
View exact numbers
Test name
Executions per second
✓
new Date()
18,632,782 Ops/sec
Date() moment date
3,517,598 Ops/sec
String moment date
1,653,236 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js'></script>
Tests:
String moment date
const date = moment('22-01-1996')
Date() moment date
const date = moment(new Date('22-01-1996'))
new Date()
const date = new Date('22-01-1996')