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

Add support for emitting flattened case tables #34

Closed
wants to merge 1 commit into from

Conversation

thomcc
Copy link
Contributor

@thomcc thomcc commented May 10, 2020

Fixes #33, which is where you should look for far too many words describing this.

Ideally we'd somehow deprecate the old version -- I don't think there's any case where it's better except for being arguably a little cleaner, and IMO defaulting to a larger, less efficient format isn't really great, even if it does avoid being a breaking change.

I'm willing to change name/description/etc of stuff -- I don't have an opinion really.

@nvzqz
Copy link

nvzqz commented Jan 29, 2022

Hey @BurntSushi I would really appreciate this change. Reducing the work at load time non-trivially is a huge win. Can you please review?

@thomcc
Copy link
Contributor Author

thomcc commented Jan 29, 2022

Hey, I'll try to rebase this on monday.

BurntSushi pushed a commit that referenced this pull request Jul 5, 2022
This permits writing tables using '[char; 3]' instead of '&[char]'. The
latter is a fat point taking up 16 bytes by itself, where as the former
is an inlined sequence of 3 codepoints, using only 12 bytes. Since the
new representation drops the length encoded in '&[char]', we use the NUL
codepoint as a sentinel.

See #33 for a more in depth description with additional upsides of this
new mode.

Closes #33, Closes #34
@BurntSushi BurntSushi closed this in 9663524 Jul 5, 2022
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.

codepoint_to_codepoints tables are needlessly wasteful
2 participants