-
Notifications
You must be signed in to change notification settings - Fork 172
Polyfill: Speed up Chinese calendar getMonthList #3156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polyfill: Speed up Chinese calendar getMonthList #3156
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3156 +/- ##
==========================================
- Coverage 96.80% 96.80% -0.01%
==========================================
Files 22 22
Lines 10131 10129 -2
Branches 1834 1835 +1
==========================================
- Hits 9807 9805 -2
Misses 273 273
Partials 51 51 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have time to get a full understanding of this change, but it looks correct. I do get about a 1% speedup measuring differences over various year ranges.
If you like I can write a snapshot test comparing some results before and after.
Thanks; that'd be great! |
b48c546
to
87efd1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, preserves all the results, including existing bugs, when run against 65884 pairs of various dates between 1900 and 2100 (the non-implementation-approximated validity range for this calendar)
fe78136
to
56020dd
Compare
Use `Date.UTC` when possible.
56020dd
to
abe0d54
Compare
Noticed in passing.