You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use FxHashSet for terminal sets in first and follow sets, but we could use fixed-size bitsets instead. I have an implementation in refactor_terminal_sets but it doesn't make much difference: a benchmark runs in 4.9s instead of 5.0s. I think part of the reason is because these sets are usually tiny, perhaps with 3-4 elements at most, so it doesn't matter what we use.
I also have a bitset implementation in smol_bitset repo. It uses a single word for bitsets smaller than 63 elements. For larger, it falls back to heap allocated word array. However, when I replace the bitset in refactor_terminal_sets branch with smol_bitset it literally made no difference in the benchmark.
The text was updated successfully, but these errors were encountered:
We currently use
FxHashSet
for terminal sets in first and follow sets, but we could use fixed-size bitsets instead. I have an implementation inrefactor_terminal_sets
but it doesn't make much difference: a benchmark runs in 4.9s instead of 5.0s. I think part of the reason is because these sets are usually tiny, perhaps with 3-4 elements at most, so it doesn't matter what we use.I also have a bitset implementation in
smol_bitset
repo. It uses a single word for bitsets smaller than 63 elements. For larger, it falls back to heap allocated word array. However, when I replace the bitset inrefactor_terminal_sets
branch withsmol_bitset
it literally made no difference in the benchmark.The text was updated successfully, but these errors were encountered: