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

Efficiently encode string slices (String'val) as FAT pointer #337

Open
mneumann opened this issue Aug 28, 2022 · 0 comments
Open

Efficiently encode string slices (String'val) as FAT pointer #337

mneumann opened this issue Aug 28, 2022 · 0 comments

Comments

@mneumann
Copy link
Contributor

In case Savi gets FAT pointers, could a string slice which String'val effectively is, be encoded more efficiently by using a special encoding for the vtable pointer to include the length of the string and the pointer itself to point directly to the string data?

This would make any string slicing or parsing operations be very efficient (similar to Rust), as no allocation would be required anymore when creating a new slice. The length of a string slice encoded as such has to be limited to less than 64-bits.

The same could be done with Array slices.

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

No branches or pull requests

1 participant