-
Notifications
You must be signed in to change notification settings - Fork 808
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
WIP Compile and cache Regexes for SUMIFS and COUNTIFS #736
Conversation
Doesn't seem to make that much of a difference. I suspected it would - especially for whole-column lookups. |
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.
This way of caching is not thread-safe, but since the entire calculation engine is not thread-safe too I don't think it's a problem. As for the performance of column-wide computations, I am currently experimenting with the alternative approach that does not require enumeration of empty values. After all, ranges in formulas may cover the whole sheet, and there is not any possibility to enumerate 17 billion values in reasonable time. If I succeed with this optimization the effect of the current PR will become more significant.
b494f41
to
86d1aaf
Compare
86d1aaf
to
b5054c7
Compare
@Pankraty Do you think we should first quantify the effect on performance before I merge? |
If you have time to measure that would be great. This will give us more information for future optimizations. |
I finally managed to do a little performance testing. Unfortunately, the effect is negligible, if any. Here is the test file I used. Reading Will check out if there are other ways to speed up the computation. PS. For testing, I rebased this branch on latest |
Yeah, I was thinking to close this eventually without merging. |
I am closing this PR, because the regexps are not a good way to parse criteria for SUMIF/COUNTIF/database functions. What is a better way forward: Use a custom parser. There already is a allocation free fast parser for wildcards ( A custom parser will parse the criteria into a comparison op and a value/bool/error/wildcard using other parsers that already exist. Benefits:
Current approach has several drawbacks:
|
Follow on from #734. Possible performance improvement.