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

Thread-local Stack Allocator for Routing Algorithms #4213

Open
daniel-j-h opened this issue Jun 29, 2017 · 0 comments
Open

Thread-local Stack Allocator for Routing Algorithms #4213

daniel-j-h opened this issue Jun 29, 2017 · 0 comments

Comments

@daniel-j-h
Copy link
Member

Implementing alternatives on mld (#3905, #4047) I used a couple of local stdlib containers which all use the global allocator to grow their internal capacity. Other routing algorithms do the same: for example the ch alternatives algorithm uses stdlib vectors, sets, etc.

Most of the time these stdlib containers are small - for example to store a couple thousands boundary nodes - and are temporary in nature getting created and destroyed over and over again.

We should hook in a thread-local stack allocator (similar to how we use thread-local heaps in the SearchEngineData) to handle small and repeated requests fast(er) and automatically grows.

Here's Hinnant's stack alloc we could use for this: http://howardhinnant.github.io/stack_alloc.html

Note: especially in the context of alternatives we should give the unpacking cache a try, too: #3835

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

2 participants