-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Dogfood new_uninit and maybe_uninit_slice in rustc_arena #76838
Conversation
412caf8
to
eba9cf2
Compare
eba9cf2
to
7b99523
Compare
@bors r+ |
📌 Commit 7b995232b6a6a02bbd4680e8b3c102623eed966c has been approved by |
Does this need a perf run? I see some regressions in the microbenchmarks, but being microbenchmarks they might lie. Did Output with base commit from bors:
Output with only the first commit:
Output with both commits:
There is tons of noise in the benchmarks but I made multiple runs each time and there is a consistent difference. There might be a regression in If I allocate 100 items and do the same clearance I can't find a regression, in fact it's a bit faster now. Benchmark: #[bench]
pub fn bench_typed_arena_clear_100(b: &mut Bencher) {
let mut arena = TypedArena::default();
b.iter(|| {
for _ in 0..100 {
arena.alloc(Point { x: 1, y: 2, z: 3 });
}
arena.clear();
})
} Before this PR:
After this PR:
Again, lot's of noise. I've added the benchmark to this PR. I've also amended the first commit to do a |
7b99523
to
2805a05
Compare
@bors r+ rollup=never I don't think this will have an effect on perfbot, but let's not roll this up to make sure |
📌 Commit 2805a05 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
Dogfoods a few cool
MaybeUninit
related features in the compiler's rustc_arena crate.Split off from #76821
r? @oli-obk