Dayjs: About performance

Created on 8 Jul 2019  路  2Comments  路  Source: iamkun/dayjs

1191562578827_ pic_hd
1201562578864_ pic_hd
One is the method I wrote myself, and one is dayjs. There's a big difference in performance

Most helpful comment

@Likunone Vanilla js is of course and always the best in performance. However, a lib dose more than just a single date compare.

That is to say, there's no need for this comparison. Besides, Day.js is still fast enough even in your 300000 times tests.

All 2 comments

@Likunone Vanilla js is of course and always the best in performance. However, a lib dose more than just a single date compare.

That is to say, there's no need for this comparison. Besides, Day.js is still fast enough even in your 300000 times tests.

Fair comparison is with other Date libs (moment, luxon, date-fns, etc), not with vanilla js

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eugeneoshepkov picture eugeneoshepkov  路  3Comments

ljmerza picture ljmerza  路  3Comments

axelg12 picture axelg12  路  4Comments

fundon picture fundon  路  5Comments

dakshshah96 picture dakshshah96  路  5Comments