diff options
author | Aria Shrimpton <me@aria.rip> | 2024-01-20 17:09:06 +0000 |
---|---|---|
committer | Aria Shrimpton <me@aria.rip> | 2024-01-20 17:12:17 +0000 |
commit | ce4ae28bc7864c5c9c2d42f29ba025d28b42772d (patch) | |
tree | 5a88a95e0f16a89cd1f5c0e0acddb2f04403326c /src/crates/benchmarker/benches | |
parent | ac6280b2a254272c1ecb5b508947bcdb84d31519 (diff) |
fix(benchmarker): more precise benchmarking without criterion
Diffstat (limited to 'src/crates/benchmarker/benches')
-rw-r--r-- | src/crates/benchmarker/benches/linked_list.rs | 9 | ||||
-rw-r--r-- | src/crates/benchmarker/benches/vec.rs | 21 |
2 files changed, 17 insertions, 13 deletions
diff --git a/src/crates/benchmarker/benches/linked_list.rs b/src/crates/benchmarker/benches/linked_list.rs new file mode 100644 index 0000000..f2997e4 --- /dev/null +++ b/src/crates/benchmarker/benches/linked_list.rs @@ -0,0 +1,9 @@ +fn main() { + let ns = [ + 64, 128, 256, 512, 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 16384, 24576, 32768, + 40960, 49152, 57344, 65536, + ]; + candelabra_benchmarker::benchmark_container::<std::collections::LinkedList<usize>, _>(&ns); + candelabra_benchmarker::benchmark_indexable::<std::collections::LinkedList<usize>, _>(&ns); + candelabra_benchmarker::benchmark_stack::<std::collections::LinkedList<usize>, _>(&ns); +} diff --git a/src/crates/benchmarker/benches/vec.rs b/src/crates/benchmarker/benches/vec.rs index ec572ca..0dd4637 100644 --- a/src/crates/benchmarker/benches/vec.rs +++ b/src/crates/benchmarker/benches/vec.rs @@ -1,14 +1,9 @@ -use criterion::{criterion_group, criterion_main, Criterion}; - -fn run_benches(c: &mut Criterion) { - candelabra_benchmarker::benchmark_container::<Vec<usize>, _>( - c, - &[ - 64, 128, 256, 512, 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 16384, 24576, 32768, - 40960, 49152, 57344, 65536, - ], - ); +fn main() { + let ns = [ + 64, 128, 256, 512, 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 16384, 24576, 32768, + 40960, 49152, 57344, 65536, + ]; + candelabra_benchmarker::benchmark_container::<Vec<usize>, _>(&ns); + candelabra_benchmarker::benchmark_indexable::<Vec<usize>, _>(&ns); + candelabra_benchmarker::benchmark_stack::<Vec<usize>, _>(&ns); } - -criterion_group!(benches, run_benches); -criterion_main!(benches); |