Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
luxon-v-Intl format, luxon-v-Date native parse
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/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
moment/luxon - format
186604.3 Ops/sec
Intl - format
261723.8 Ops/sec
moment/luxon - parse
632284.9 Ops/sec
Native parse
8922743.0 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/luxon@2.0.2/build/global/luxon.min.js"></script>
Script Preparation code:
window.__dateISO__ = '2021-09-24T07:36:51+0000' window.__date__ = new Date(__dateISO__); window.__expected__ = '09/24/2021'; window.__intlFormatter = new Intl.DateTimeFormat('en', { year: '2-digit', month: '2-digit', day: '2-digit', });
Tests:
moment/luxon - format
var actual = luxon.DateTime.fromJSDate(__date__).toLocaleString(); console.assert(actual === __expected__);
Intl - format
var actual = window.__intlFormatter.format(__date__); console.assert(actual === __expected__);
moment/luxon - parse
var actual = luxon.DateTime.fromISO(__dateISO__).toJSDate(); console.assert(__date__.getTime() === actual.getTime());
Native parse
var actual = new Date(__dateISO__); console.assert(__date__.getTime() === actual.getTime());