Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
dayjs vs Date
(version: 1)
Comparing performance of:
Dayjs vs luxon
Created:
11 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.9/dayjs.min.js"></script>
Script Preparation code:
const dates = Array.from({ length: 300 }, (_, i) => { const date = new Date(); date.setDate(date.getDate() + i); return date.toISOString().split('T')[0]; });
Tests:
Dayjs
dates.sort((a,b) => { const dateA = dayjs(a); const dateB = dayjs(b); return dateB.isAfter(dateA) ? 1 : -1; })
luxon
dates.sort((a,b) => { const dateA = new Date(a).getTime(); const dateB = new Date(b).getTime(); return dateB - dateA; })
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Dayjs
luxon
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
11 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser/OS:
Chrome 137 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Dayjs
5254.4 Ops/sec
luxon
33392.4 Ops/sec
Related benchmarks:
date utils
Dayjs Date-fns format comparison 2
Dayjs Date-fns format comparison 3
Dayjs Date-fns format comparison 4
Dayjs Date-fns format comparison 5
Dayjs Date-fns format comparison 6
avith find first last of week
dayjs valueof vs isBefore
Dayjs Date-fns format and add day comparison
Comments
Confirm delete:
Do you really want to delete benchmark?