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

Investigate inlining the fast path of jemalloc #14151

Closed
pcwalton opened this issue May 12, 2014 · 2 comments
Closed

Investigate inlining the fast path of jemalloc #14151

pcwalton opened this issue May 12, 2014 · 2 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@pcwalton
Copy link
Contributor

jemalloc seems to have the ability to inline the fast path of allocation. It would be awesome to do cross-language inlining so that we can make allocation equivalent to pulling a pointer off the free list in many places.

This would help get Servo flow allocation performance on par with WebKit/Blink's.

@pcwalton
Copy link
Contributor Author

cc @thestinger

@thestinger
Copy link
Contributor

The fast path is currently far too large for inlining it to work out well. The function call itself is a small part of the cost. It needs to handle a lot of special cases like coping with thread-local data destructors. It might make sense to poke some holes in the API based on guarantees on the Rust end, but I think we should deal with the lower-hanging fruit before considering that. I think there's at least 20-30% more to gain inside jemalloc itself from thread cache improvements.

bors added a commit to rust-lang-ci/rust that referenced this issue Feb 20, 2023
internal: Enable smallvec's `union` feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

2 participants