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

See if our unicode indexing can be optimized #87

Open
uliwitness opened this issue Dec 11, 2016 · 0 comments
Open

See if our unicode indexing can be optimized #87

uliwitness opened this issue Dec 11, 2016 · 0 comments
Labels
display Platform-specific display code or cross-platform layout code. interpreter Hammer programming language: Parser, tokenizer, interpreter.

Comments

@uliwitness
Copy link
Owner

AIUI, if you index into a random byte in a UTF8 string (i.e. to a code unit), you can tell where the code point for this character starts, and how long it is. So we can remember the last accessed code point and the equivalent code unit and then scan backwards or forwards more efficiently. There may be other optimizations that are possible, it's worth investigating.

@uliwitness uliwitness added display Platform-specific display code or cross-platform layout code. interpreter Hammer programming language: Parser, tokenizer, interpreter. labels Dec 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display Platform-specific display code or cross-platform layout code. interpreter Hammer programming language: Parser, tokenizer, interpreter.
Projects
None yet
Development

No branches or pull requests

1 participant