We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent daccd17 commit 2805a05Copy full SHA for 2805a05
compiler/rustc_arena/src/tests.rs
@@ -121,6 +121,17 @@ pub fn bench_typed_arena_clear(b: &mut Bencher) {
121
})
122
}
123
124
+#[bench]
125
+pub fn bench_typed_arena_clear_100(b: &mut Bencher) {
126
+ let mut arena = TypedArena::default();
127
+ b.iter(|| {
128
+ for _ in 0..100 {
129
+ arena.alloc(Point { x: 1, y: 2, z: 3 });
130
+ }
131
+ arena.clear();
132
+ })
133
+}
134
+
135
// Drop tests
136
137
struct DropCounter<'a> {
0 commit comments