Add bench_typed_arena_clear_100 bench
This commit is contained in:
parent
daccd1709e
commit
2805a05154
1 changed files with 11 additions and 0 deletions
|
@ -121,6 +121,17 @@ pub fn bench_typed_arena_clear(b: &mut Bencher) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[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();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Drop tests
|
// Drop tests
|
||||||
|
|
||||||
struct DropCounter<'a> {
|
struct DropCounter<'a> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue