2019-01-07 08:38:19 -08:00
|
|
|
#![feature(test)]
|
|
|
|
|
|
|
|
extern crate test;
|
|
|
|
|
2019-03-25 13:10:56 -07:00
|
|
|
use solana_runtime::runtime::*;
|
2019-01-07 08:38:19 -08:00
|
|
|
use test::Bencher;
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn bench_has_duplicates(bencher: &mut Bencher) {
|
|
|
|
bencher.iter(|| {
|
|
|
|
let data = test::black_box([1, 2, 3]);
|
|
|
|
assert!(!has_duplicates(&data));
|
|
|
|
})
|
|
|
|
}
|