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 realloc based TexelBuffer<T>::into_vec(self) -> Vec<T> #49

Open
HeroicKatora opened this issue May 26, 2022 · 0 comments
Open

Add realloc based TexelBuffer<T>::into_vec(self) -> Vec<T> #49

HeroicKatora opened this issue May 26, 2022 · 0 comments

Comments

@HeroicKatora
Copy link
Member

This can be more efficient than use to_owned() on a deref'd slice. By letting the allocator decide if the allocation can be reused with a different alignment, it can elide a memcpy operation in some cases. Presumably, at least a lot of cases. Other alignment-aware allocators may be able to just move the allocation to a new bucket instead.

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