Skip to content

Remove expensive safety combination Table#2818

Closed
aldexis wants to merge 2 commits intoxb/memoize_safety_evalfrom
ald/proposed-extra-changes
Closed

Remove expensive safety combination Table#2818
aldexis wants to merge 2 commits intoxb/memoize_safety_evalfrom
ald/proposed-extra-changes

Conversation

@aldexis
Copy link
Contributor

@aldexis aldexis commented Feb 24, 2026

Before this PR

After #2812, JFRs show that we still spend a large amount of time getting results from the precomputed combination table. This is because it's dealing with objects, so we need to compute their hashcode and get the values in the map. Instead, we can use our own internal table, based on an array and the actual underlying enum values (similar to what an EnumMap would do, but mapping two keys instead).

image image image

After this PR

==COMMIT_MSG==
Remove expensive safety combination Table
==COMMIT_MSG==

Possible downsides?

@aldexis
Copy link
Contributor Author

aldexis commented Feb 25, 2026

This didn't bring the benefits I hoped it would, so closing

@aldexis aldexis closed this Feb 25, 2026
@aldexis aldexis deleted the ald/proposed-extra-changes branch February 25, 2026 10:16
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

Successfully merging this pull request may close these issues.

1 participant