Skip to content
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

Improve Fixed.startOfWeek performance #71

Open
davedelong opened this issue Feb 29, 2024 · 0 comments
Open

Improve Fixed.startOfWeek performance #71

davedelong opened this issue Feb 29, 2024 · 0 comments
Milestone

Comments

@davedelong
Copy link
Owner

Fixed.startOfWeek performs an O(n) search backwards to find the closest day with the proper .dayOfWeek value. This could be short-circuited by attempting to calculate how far away the start of the week should be, jumping to it, and testing the value. Then the iterative approach could be used as a fallback.

@davedelong davedelong added this to the 1.1 milestone Apr 7, 2024
davedelong added a commit that referenced this issue Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant