Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
luxon vs datefns vs moment vs dayjs (calculations)
(version: 0)
Comparing performance of:
datefns vs luxon vs moment vs dayjs
Created:
4 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js" integrity="sha512-bwD3VD/j6ypSSnyjuaURidZksoVx3L1RPvTkleC48SbHCZsemT3VKMD39KknPnH728LLXVMTisESIBOAb5/W0Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/luxon/2.3.0/luxon.min.js" integrity="sha512-2j5fkjQ4q5ceXgfxi+kqrU2Oz234MrpyywZsQz1F5OGnfat7mOhjRr0oz5cpQ+YwwWB+hhDBSyxNGuL/tKWMFw==" 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.1/moment.min.js" integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ==" crossorigin="anonymous" 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");
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
datefns
luxon
moment
dayjs
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Browser/OS:
Chrome 144 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
datefns
924945.5 Ops/sec
luxon
331067.2 Ops/sec
moment
1778286.4 Ops/sec
dayjs
382961.4 Ops/sec
Related benchmarks:
luxon vs datefns vs moment vs dayjs (formatting)
luxon v dayjs vs moment v luxon
luxon 3.2.1 vs datefns vs moment vs dayjs (formatting)
luxon vs datefns vs moment vs dayjs (calculations) new
Comments
Confirm delete:
Do you really want to delete benchmark?