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

Benchmark difference with SmallVec<[u8;31]> #32

Open
kevaundray opened this issue Dec 4, 2021 · 0 comments
Open

Benchmark difference with SmallVec<[u8;31]> #32

kevaundray opened this issue Dec 4, 2021 · 0 comments

Comments

@kevaundray
Copy link
Contributor

Inner nodes can have variable lengths up to 31 bytes. Currently, we are using Vec for this, however we could use SmallVec which would not create a heap allocation until the size goes over 31 bytes.

The downside is that with enough SmallVec's, we may run into stack overflow issues. Also note that accessing the stack will not always be faster than accessing the heap, see https://stackoverflow.com/a/24057744 . Hence, we should benchmark the difference in pathological and non-pathological cases.

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