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

core-vec-append has gotten slower #3183

Closed
eholk opened this issue Aug 11, 2012 · 5 comments
Closed

core-vec-append has gotten slower #3183

eholk opened this issue Aug 11, 2012 · 5 comments
Labels
I-slow Issue: Problems and improvements with respect to performance of generated code.
Milestone

Comments

@eholk
Copy link
Contributor

eholk commented Aug 11, 2012

This seems to have happened around 0284f94. Normally this test being slower leads to dramatic slowdowns across the board, which doesn't seem to have happened here. Still, we should keep an eye on it. The benchmark time went from about 500ms to 2.25s.

@eholk
Copy link
Contributor Author

eholk commented Sep 7, 2012

The latest perf graphs show this being back at where it was.

@eholk eholk closed this as completed Sep 7, 2012
@brson
Copy link
Contributor

brson commented Sep 7, 2012

Subtle changes in code gen are causing major performance swings by hitting stack boundaries in different ways.

@BrendanEich
Copy link

I mentioned this in private mail, may as well leave it here in case it helps:

https://bugzilla.mozilla.org/show_bug.cgi?id=472791, especially
https://bugzilla.mozilla.org/show_bug.cgi?id=472791#c15

/be

@brson
Copy link
Contributor

brson commented Sep 8, 2012

Thanks, Brendan.

@graydon
Copy link
Contributor

graydon commented Sep 10, 2012

Yeah, it's possible cache split load/stores are magnifying the effect, or penalizing later stack segments by (f.e.) making them not be 64-byte aligned (or whatever the line size is, and presumably whatever LLVM assumes its frames are). But honestly I think the main thing is just that we're hitting cases where recursive code either bottoms out within a stack chunk or thrashes back-and-forth over the edge of one.

To fix this more-long-term I'd like to try moving to a single chunk size (== OS page size) and keeping the pages in a per-task freelist. This will work nicely with the mostly-copying GC that pcwalton's suggesting we play with too: the task can share a single task-local page freelist between stack and GC uses. The only additional check we'd need in that case is for larger-than-a-page-sized allocations / stack frames, which we can service from a slower malloc path (and should be rare). Should also solve any potential mismatches between LLVM-assumed alignment of the stack and where we start each frame.

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
do not wrap comments in doctest to avoid failing doctest runs
RalfJung pushed a commit to RalfJung/rust that referenced this issue Nov 25, 2023
RalfJung pushed a commit to RalfJung/rust that referenced this issue Nov 25, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

4 participants