Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
luxon vs datefns vs moment vs dayjs (calculations) new
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/148.0.0.0 Safari/537.36
Browser:
Chrome 148
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 months ago
moment
3.3M/s
datefns
1.5M/s
dayjs
650K/s
luxon
641K/s
View exact numbers
Test name
Executions per second
✓
moment
3,343,487 Ops/sec
datefns
1,464,172 Ops/sec
dayjs
649,691 Ops/sec
luxon
640,589 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.7/dayjs.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/luxon/3.3.0/luxon.min.js"crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/date-fns/1.30.1/date_fns.min.js" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js" referrerpolicy="no-referrer"></script>
Script Preparation code:
window.__date__ = new Date(); window.__luxon__ = luxon.DateTime.fromJSDate(__date__); window.__moment__ = moment(__date__); window.__dayjs__ = dayjs(__date__);
Tests:
datefns
dateFns.addYears(__date__, 2);
luxon
__luxon__.plus({ years: 2 });
moment
__moment__.add(2, 'year');
dayjs
__dayjs__.add(2, "year");