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

Custom allocators #9

Open
michaeleisel opened this issue Feb 18, 2020 · 2 comments
Open

Custom allocators #9

michaeleisel opened this issue Feb 18, 2020 · 2 comments

Comments

@michaeleisel
Copy link

It looks like a significant % of time can be spent in malloc and realloc. It would be awesome to be able to pass in custom allocators to speed those up.

@Tessil
Copy link
Owner

Tessil commented Feb 23, 2020

Hi,

Effectively, due to the nature of the data structure most time will be spend on allocations on insertion.

Currently there is no support for a custom allocator due to the fact that std::allocator_traits has no reallocate method. Using std::realloc with a char buffer allows the standard library implementation to do some potential extra optimizations.

I will see if I can add support for a custom allocator which must implement a realloc function in addition to the traits in std::allocator_traits.

Thibaut

@michaeleisel
Copy link
Author

That'd be great, thanks!

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

2 participants