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 a benchmark for creating large uninit allocations #3638

Merged
merged 1 commit into from
May 29, 2024

Conversation

saethlin
Copy link
Member

Extracted from #3637

I used this program to confirm that rust-lang/rust#125633 has the desired effect.

@saethlin
Copy link
Member Author

That is strange. The only docs I can find suggest this should fit comfortably on a GitHub-hosted runner: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

@RalfJung
Copy link
Member

Note that on Windows we're using a 32bit target as the host. Not sure how Windows manages the address space there, maybe it keeps half of it for the kernel so there's only 2GB total for the program?

@RalfJung
Copy link
Member

So probably it would make sense to decrease the allocation size to 1GB if the pointer_width is 32.

@saethlin
Copy link
Member Author

Right. I was trying to avoid doing that because the effect size shrinks, but of course a little loop fixes that.

@RalfJung
Copy link
Member

How long does the benchmark take (with the fix)?

@RalfJung
Copy link
Member

rust-lang/rust#125633 landed, but a ./miri rustc-pull will be needed before we have it available in the repo.

@saethlin
Copy link
Member Author

How long does the benchmark take (with the fix)?

200 ms per iteration with the fix. Without the fix, it's 800 ms per iteration. So I think it would be fair to land this without the fix, because it's already one of our faster benchmarks.

@RalfJung
Copy link
Member

Makes sense, thanks!
@bors r+

@bors
Copy link
Contributor

bors commented May 29, 2024

📌 Commit 88a2496 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented May 29, 2024

⌛ Testing commit 88a2496 with merge 952aa4d...

@bors
Copy link
Contributor

bors commented May 29, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 952aa4d to master...

@bors bors merged commit 952aa4d into rust-lang:master May 29, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

3 participants