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

String indexing optimizations #115

Open
KCreate opened this issue Aug 31, 2022 · 0 comments
Open

String indexing optimizations #115

KCreate opened this issue Aug 31, 2022 · 0 comments

Comments

@KCreate
Copy link
Owner

KCreate commented Aug 31, 2022

  • Strings should cache wether they contain multibyte utf8 characters or not.
  • Also cache the amount of utf8 codepoints in the string, as right now this value needs to be recalculated each time the length field gets accessed.
  • Strings that do not contain multibyte utf8 codepoints can benefit from fast O(1) index access.
  • For very big strings, an index lookup table could be constructed to cache certain codepoint offsets in order to speed up those accesses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant