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

Calls to LocalDate.lengthOfYear are surprisingly expensive #1341

Open
cjkent opened this issue Sep 26, 2016 · 0 comments
Open

Calls to LocalDate.lengthOfYear are surprisingly expensive #1341

cjkent opened this issue Sep 26, 2016 · 0 comments

Comments

@cjkent
Copy link
Contributor

cjkent commented Sep 26, 2016

LocalDateUtils.daysBetween calls LocalDate.lengthOfYear. LocalDate.lengthOfYear was over 15% of the runtime in one of my tests (swap pricing over multiple scenarios). It might be a quick performance win to build an array of year lengths up front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant