Skip to content

Commit

Permalink
refactor: remove criterion dep
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-cheng committed Nov 1, 2021
1 parent b6fa26b commit 9d59bad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ features = [
"sysinfoapi",
]

[dev-dependencies]
criterion = "0.3"

[target.'cfg(unix)'.build-dependencies]
cc = "1.0"

Expand Down
9 changes: 8 additions & 1 deletion tests/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
pub(crate) use criterion::black_box;
#[inline(never)]
pub(crate) fn black_box<T>(input: T) -> T {
unsafe {
let ret = core::ptr::read_volatile(&input);
core::mem::forget(input);
ret
}
}

pub(crate) fn computation_task() -> usize {
fn fib(n: usize) -> usize {
Expand Down

0 comments on commit 9d59bad

Please sign in to comment.