Skip to content

Commit

Permalink
Make benchmark more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 14, 2024
1 parent f2c22f0 commit f11fbfb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/swc_allocator/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ fn bench_alloc(c: &mut Criterion) {
})
}

c.bench_function("common/allocator/alloc/std/100000", |b| {
direct_alloc_std(b, 100000)
c.bench_function("common/allocator/alloc/std/1000000", |b| {
direct_alloc_std(b, 1000000)
});
c.bench_function("common/allocator/alloc/no-scope/100000", |b| {
direct_alloc_no_scope(b, 100000)
c.bench_function("common/allocator/alloc/no-scope/1000000", |b| {
direct_alloc_no_scope(b, 1000000)
});
c.bench_function("common/allocator/alloc/scoped/100000", |b| {
direct_alloc_scoped(b, 100000)
c.bench_function("common/allocator/alloc/scoped/1000000", |b| {
direct_alloc_scoped(b, 1000000)
});

c.bench_function("common/allocator/alloc/cached-no-scope/100000", |b| {
fast_alloc_no_scope(b, 100000)
c.bench_function("common/allocator/alloc/cached-no-scope/1000000", |b| {
fast_alloc_no_scope(b, 1000000)
});
c.bench_function("common/allocator/alloc/cached-scoped/100000", |b| {
fast_alloc_scoped(b, 100000)
c.bench_function("common/allocator/alloc/cached-scoped/1000000", |b| {
fast_alloc_scoped(b, 1000000)
});
}

Expand Down

0 comments on commit f11fbfb

Please sign in to comment.