bench: Disambiguate benchmark names in mem_icount
The latest release of gungraun uses global symbols to register tests. Since it doesn't know about modules, these conflict. Add the module name so this isn't an issue, but keep the modules around because they are useful for organization.
This commit is contained in:
parent
c8f0d643c0
commit
b09903f791
1 changed files with 9 additions and 9 deletions
|
|
@ -108,7 +108,7 @@ mod mcpy {
|
|||
],
|
||||
setup = setup,
|
||||
)]
|
||||
fn bench((len, mut dst, src): (usize, AlignedSlice, AlignedSlice)) {
|
||||
fn bench_cpy((len, mut dst, src): (usize, AlignedSlice, AlignedSlice)) {
|
||||
unsafe {
|
||||
black_box(memcpy(
|
||||
black_box(dst.as_mut_ptr()),
|
||||
|
|
@ -118,7 +118,7 @@ mod mcpy {
|
|||
}
|
||||
}
|
||||
|
||||
library_benchmark_group!(name = memcpy; benchmarks = bench);
|
||||
library_benchmark_group!(name = memcpy; benchmarks = bench_cpy);
|
||||
}
|
||||
|
||||
mod mset {
|
||||
|
|
@ -157,7 +157,7 @@ mod mset {
|
|||
],
|
||||
setup = setup,
|
||||
)]
|
||||
fn bench((len, mut dst): (usize, AlignedSlice)) {
|
||||
fn bench_set((len, mut dst): (usize, AlignedSlice)) {
|
||||
unsafe {
|
||||
black_box(memset(
|
||||
black_box(dst.as_mut_ptr()),
|
||||
|
|
@ -167,7 +167,7 @@ mod mset {
|
|||
}
|
||||
}
|
||||
|
||||
library_benchmark_group!(name = memset; benchmarks = bench);
|
||||
library_benchmark_group!(name = memset; benchmarks = bench_set);
|
||||
}
|
||||
|
||||
mod mcmp {
|
||||
|
|
@ -225,7 +225,7 @@ mod mcmp {
|
|||
],
|
||||
setup = setup
|
||||
)]
|
||||
fn bench((len, mut dst, src): (usize, AlignedSlice, AlignedSlice)) {
|
||||
fn bench_cmp((len, mut dst, src): (usize, AlignedSlice, AlignedSlice)) {
|
||||
unsafe {
|
||||
black_box(memcmp(
|
||||
black_box(dst.as_mut_ptr()),
|
||||
|
|
@ -235,7 +235,7 @@ mod mcmp {
|
|||
}
|
||||
}
|
||||
|
||||
library_benchmark_group!(name = memcmp; benchmarks = bench);
|
||||
library_benchmark_group!(name = memcmp; benchmarks = bench_cmp);
|
||||
}
|
||||
|
||||
mod mmove {
|
||||
|
|
@ -384,7 +384,7 @@ mod mmove {
|
|||
],
|
||||
setup = setup_forward
|
||||
)]
|
||||
fn forward((len, spread, mut buf): (usize, usize, AlignedSlice)) {
|
||||
fn forward_move((len, spread, mut buf): (usize, usize, AlignedSlice)) {
|
||||
// Test moving from the start of the buffer toward the end
|
||||
unsafe {
|
||||
black_box(memmove(
|
||||
|
|
@ -478,7 +478,7 @@ mod mmove {
|
|||
],
|
||||
setup = setup_backward
|
||||
)]
|
||||
fn backward((len, spread, mut buf): (usize, usize, AlignedSlice)) {
|
||||
fn backward_move((len, spread, mut buf): (usize, usize, AlignedSlice)) {
|
||||
// Test moving from the end of the buffer toward the start
|
||||
unsafe {
|
||||
black_box(memmove(
|
||||
|
|
@ -489,7 +489,7 @@ mod mmove {
|
|||
}
|
||||
}
|
||||
|
||||
library_benchmark_group!(name = memmove; benchmarks = forward, backward);
|
||||
library_benchmark_group!(name = memmove; benchmarks = forward_move, backward_move);
|
||||
}
|
||||
|
||||
use mcmp::memcmp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue