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

Reduce the size of the DAFSA nodes for names #612

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

squeek502
Copy link
Contributor

@squeek502 squeek502 commented Jan 4, 2024

Just something random I noticed: names can use 32 bits per DAFSA node instead of the 64 bits needed for the builtins.

I haven't done any performance/size comparisons but it should make for a smaller and faster names DAFSA.

Just for context, the absolute minimum number of bits for a names DAFSA node as it currently exists would be 22: 5 for char since it only includes _ and a-z [but if it was stored as u5 then it'd need a + '_' transformation to get the actual ASCII value], 2 for the end_of_word/end_of_list bools, 5 for number since the max value is 24, and 10 for child_index since the max value is 621)

Names can use 32 bits per DAFSA node instead of the 64 bits needed for the builtins.
@Vexu Vexu merged commit 375dedb into Vexu:master Jan 4, 2024
3 checks passed
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