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; rv:120.0) Gecko/20100101 Firefox/120.0
Browser:
Firefox 120
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
String moment date
460571.0 Ops/sec
Date() moment date
609714.1 Ops/sec
new Date()
8381132.5 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')