extern crate criterion; extern crate c_math; // use criterion::{black_box,criterion_group,criterion_main,Criterion}; use criterion::{criterion_group, criterion_main, Criterion, black_box}; use c_math::get_bits::*; fn bench_mark_get_bit_from_u(c:&mut Criterion){ c.bench_function("get_bit_from_u",|b|b.iter(||get_bit_from_u(10 as u64,63,1,0))); } fn bench_mark_get_bit_from_u32(c:&mut Criterion){ c.bench_function("get_bit_from_u64",|b|b.iter(||get_bit_from_u64(10,63))); } criterion_group!(benches,bench_mark_get_bit_from_u32,bench_mark_get_bit_from_u); criterion_main!(benches);