-
Notifications
You must be signed in to change notification settings - Fork 802
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
[engine.i] even faster gnc_get_match_commodity_splits #1926
[engine.i] even faster gnc_get_match_commodity_splits #1926
Conversation
daa7430
to
faab3c6
Compare
1443c36
to
9fb9afa
Compare
no idea why it won't compile on github... all passes well on my pop_os end. |
It's just macOS (so far anyway). That's the problem I posted about on IRC. |
641e7aa
to
4c379f7
Compare
f1bb89b
to
e46d022
Compare
What's going wrong with |
Beats me... Try reverting the fix-up commit and push: The Ubuntu 22.04 ci shows lots of test errors proving that the lower_bound approach is giving incorrect results! |
You got the comparison backwards in |
5c620a0
to
ad9ca36
Compare
Ok you're right :-) |
The next question is why did arch ci pass the tests then... |
ad9ca36
to
78ad530
Compare
78ad530
to
e53dfa6
Compare
- uses binary search to find first split after date - for_each from earliest split to (but excluding) the above first split
gnc_get_match_commodity_splits needs to scan the account splitlists to find suitable splits upto end_date. Because splitlist is date-sorted, use gnc_account_foreach_split_until_date to avoid scanning later splits.
e53dfa6
to
4c29f69
Compare
gnc_get_match_commodity_splits
needs to scan the account splitlists to find suitable splits uptoend_date
. We can stop scanning each account atend_date
because the splitlists are sorted by date. This saves significant time because majority of splits can by bypassed in the early report dates.My primary book net worth linechart benchmarks -- fastest speeds from 1.05s to 0.54s, now practically unnoticeable