-
Notifications
You must be signed in to change notification settings - Fork 412
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
Collect rules with Appendable_list.t instead of Id.Map.t #9057
Conversation
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Philip White <code@trailingwhite.space>
Signed-off-by: Philip White <code@trailingwhite.space>
The hypothesis is the unioning maps together is somewhat expensive and isn't necessary, since the maps are always disjoint. Instead, we just concatenate lists together. Signed-off-by: Philip White <code@trailingwhite.space>
Signed-off-by: Philip White <code@trailingwhite.space>
It's probably not worth reviewing until #9050 gets merged, so that the diff in this PR isn't as large. I wish GitHub knew how to handle PR chains. |
Converting to draft because I was silly and forgot to run tests, which are broken. |
The bench shows some very promising results!
|
However it seems there are times when the union is eliminating duplicates:
I wonder if these can be resolved by not duplicating them to begin with. 🤔 |
@Alizter Awesome, thanks for the benchmark results! Regarding the test failures, some of them are just re-orderings of rules, which is expected. Other failures, like the one you highlighted, replace one error message with another. I suspect that the duplicate rules error message isn't new, but has just been hidden by the first error message - the re-ordering of rules changed which one actually gets displayed. Notice that the error you pointed out is very similar to #1645 , which is yet to be fixed. |
@pmwhite please re-open once you make some progress on this |
Based on #9050, the main goal is to replace the unioning of a bunch of maps with what I expect to be a cheaper operation. I've benchmarked a similar patch on Jane Street's code base and saw enough improvement to think that this is a worthwhile refactor. My thinking was to have review done first here on GitHub; once it is able to be merged I'll import it, run benchmark it again and report back with a summary of the results.