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

BestFirstSearch: switch to Long as State key #3942

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

kitbellew
Copy link
Collaborator

State column is unlikely to exceed 24 bits (or 16+ mln bytes), but even in cases when it might, a given token (that is, at a given State depth) cannot conceivably be formatted at two different column values which are a multiple of 2^24 bytes apart.

Hence, let's form state key by keeping indentation (just like before) at 8 bits, limiting column to 24 bits and combining with depth in the remaining 32 bits (and this combining is what ensures no hash conflict).

State column is unlikely to exceed 24 bits (or 16+ mln bytes), but even
in cases when it might, a given token (that is, at a given State depth)
cannot conceivably be formatted at two different column values which are
a multiple of 2^24 bytes apart.

Hence, let's form state key by keeping indentation (just like before)
at 8 bits, limiting column to 24 bits and combining with depth in the
remaining 32 bits (and this combining is what ensures no hash conflict).
@kitbellew kitbellew merged commit c3d0a1e into scalameta:master Apr 28, 2024
9 checks passed
@kitbellew kitbellew deleted the 3942 branch April 28, 2024 15:25
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.

2 participants