Skip to content

Commit

Permalink
Increase the limits of benchmarks.
Browse files Browse the repository at this point in the history
They were running too fast to have reliable results.
  • Loading branch information
orium committed Nov 5, 2023
1 parent 98045ce commit 0a6de0a
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 81 deletions.
12 changes: 6 additions & 6 deletions benches/rpds_hash_trie_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rpds::HashTrieMap;
use std::hint::black_box;

fn rpds_hash_trie_map_insert(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds hash trie map insert", move |b| {
b.iter(|| {
Expand All @@ -26,7 +26,7 @@ fn rpds_hash_trie_map_insert(c: &mut Criterion) {
}

fn rpds_hash_trie_map_insert_mut(c: &mut Criterion) {
let limit = 5_000;
let limit = 50_000;

c.bench_function("rpds hash trie map insert mut", move |b| {
b.iter(|| {
Expand All @@ -42,7 +42,7 @@ fn rpds_hash_trie_map_insert_mut(c: &mut Criterion) {
}

fn rpds_hash_trie_map_remove(c: &mut Criterion) {
let limit = 5_000;
let limit = 50_000;

c.bench_function("rpds hash trie map remove", move |b| {
b.iter_with_setup(
Expand All @@ -67,7 +67,7 @@ fn rpds_hash_trie_map_remove(c: &mut Criterion) {
}

fn rpds_hash_trie_map_remove_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds hash trie map remove mut", move |b| {
b.iter_with_setup(
Expand All @@ -92,7 +92,7 @@ fn rpds_hash_trie_map_remove_mut(c: &mut Criterion) {
}

fn rpds_hash_trie_map_get(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;
let mut map = HashTrieMap::new();

for i in 0..limit {
Expand All @@ -109,7 +109,7 @@ fn rpds_hash_trie_map_get(c: &mut Criterion) {
}

fn rpds_hash_trie_map_iterate(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;
let mut map = HashTrieMap::new();

for i in 0..limit {
Expand Down
12 changes: 6 additions & 6 deletions benches/rpds_hash_trie_map_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rpds::HashTrieMapSync;
use std::hint::black_box;

fn rpds_hash_trie_map_sync_insert(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds hash trie map sync insert", move |b| {
b.iter(|| {
Expand All @@ -26,7 +26,7 @@ fn rpds_hash_trie_map_sync_insert(c: &mut Criterion) {
}

fn rpds_hash_trie_map_sync_insert_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds hash trie map sync insert mut", move |b| {
b.iter(|| {
Expand All @@ -42,7 +42,7 @@ fn rpds_hash_trie_map_sync_insert_mut(c: &mut Criterion) {
}

fn rpds_hash_trie_map_sync_remove(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds hash trie map sync remove", move |b| {
b.iter_with_setup(
Expand All @@ -67,7 +67,7 @@ fn rpds_hash_trie_map_sync_remove(c: &mut Criterion) {
}

fn rpds_hash_trie_map_sync_remove_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds hash trie map sync remove mut", move |b| {
b.iter_with_setup(
Expand All @@ -92,7 +92,7 @@ fn rpds_hash_trie_map_sync_remove_mut(c: &mut Criterion) {
}

fn rpds_hash_trie_map_sync_get(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;
let mut map = HashTrieMapSync::new_sync();

for i in 0..limit {
Expand All @@ -109,7 +109,7 @@ fn rpds_hash_trie_map_sync_get(c: &mut Criterion) {
}

fn rpds_hash_trie_map_sync_iterate(c: &mut Criterion) {
let limit = 10_000;
let limit = 1_000_000;
let mut map = HashTrieMapSync::new_sync();

for i in 0..limit {
Expand Down
14 changes: 7 additions & 7 deletions benches/rpds_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rpds::List;
use std::hint::black_box;

fn rpds_list_push_front(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list push front", move |b| {
b.iter(|| {
Expand All @@ -26,7 +26,7 @@ fn rpds_list_push_front(c: &mut Criterion) {
}

fn rpds_list_push_front_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list push front mut", move |b| {
b.iter(|| {
Expand All @@ -42,7 +42,7 @@ fn rpds_list_push_front_mut(c: &mut Criterion) {
}

fn rpds_list_drop_first(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list drop first", move |b| {
b.iter_with_setup(
Expand All @@ -67,7 +67,7 @@ fn rpds_list_drop_first(c: &mut Criterion) {
}

fn rpds_list_drop_first_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list drop first mut", move |b| {
b.iter_with_setup(
Expand All @@ -92,7 +92,7 @@ fn rpds_list_drop_first_mut(c: &mut Criterion) {
}

fn rpds_list_reverse(c: &mut Criterion) {
let limit = 1_000;
let limit = 10_000;

c.bench_function("rpds list reverse", move |b| {
b.iter_with_setup(
Expand All @@ -117,7 +117,7 @@ fn rpds_list_reverse(c: &mut Criterion) {
}

fn rpds_list_reverse_mut(c: &mut Criterion) {
let limit = 1_000;
let limit = 10_000;

c.bench_function("rpds list reverse mut", move |b| {
b.iter_with_setup(
Expand All @@ -142,7 +142,7 @@ fn rpds_list_reverse_mut(c: &mut Criterion) {
}

fn rpds_list_iterate(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;
let mut list = List::new();

for i in 0..limit {
Expand Down
14 changes: 7 additions & 7 deletions benches/rpds_list_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rpds::ListSync;
use std::hint::black_box;

fn rpds_list_sync_push_front(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list sync push front", move |b| {
b.iter(|| {
Expand All @@ -26,7 +26,7 @@ fn rpds_list_sync_push_front(c: &mut Criterion) {
}

fn rpds_list_sync_push_front_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list sync push front mut", move |b| {
b.iter(|| {
Expand All @@ -42,7 +42,7 @@ fn rpds_list_sync_push_front_mut(c: &mut Criterion) {
}

fn rpds_list_sync_drop_first(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list sync drop first", move |b| {
b.iter_with_setup(
Expand All @@ -67,7 +67,7 @@ fn rpds_list_sync_drop_first(c: &mut Criterion) {
}

fn rpds_list_sync_drop_first_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds list sync drop first mut", move |b| {
b.iter_with_setup(
Expand All @@ -92,7 +92,7 @@ fn rpds_list_sync_drop_first_mut(c: &mut Criterion) {
}

fn rpds_list_sync_reverse(c: &mut Criterion) {
let limit = 1_000;
let limit = 2_000;

c.bench_function("rpds list sync reverse", move |b| {
b.iter_with_setup(
Expand All @@ -117,7 +117,7 @@ fn rpds_list_sync_reverse(c: &mut Criterion) {
}

fn rpds_list_sync_reverse_mut(c: &mut Criterion) {
let limit = 1_000;
let limit = 2_000;

c.bench_function("rpds list sync reverse mut", move |b| {
b.iter_with_setup(
Expand All @@ -142,7 +142,7 @@ fn rpds_list_sync_reverse_mut(c: &mut Criterion) {
}

fn rpds_list_sync_iterate(c: &mut Criterion) {
let limit = 10_000;
let limit = 1_000_000;
let mut list: ListSync<usize> = ListSync::new_sync();

for i in 0..limit {
Expand Down
10 changes: 5 additions & 5 deletions benches/rpds_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rpds::Queue;
use std::hint::black_box;

fn rpds_queue_enqueue(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue enqueue", move |b| {
b.iter(|| {
Expand All @@ -26,7 +26,7 @@ fn rpds_queue_enqueue(c: &mut Criterion) {
}

fn rpds_queue_enqueue_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue enqueue mut", move |b| {
b.iter(|| {
Expand All @@ -42,7 +42,7 @@ fn rpds_queue_enqueue_mut(c: &mut Criterion) {
}

fn rpds_queue_dequeue(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue dequeue", move |b| {
b.iter_with_setup(
Expand All @@ -67,7 +67,7 @@ fn rpds_queue_dequeue(c: &mut Criterion) {
}

fn rpds_queue_dequeue_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue dequeue mut", move |b| {
b.iter_with_setup(
Expand All @@ -92,7 +92,7 @@ fn rpds_queue_dequeue_mut(c: &mut Criterion) {
}

fn rpds_queue_iterate(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;
let mut queue: Queue<usize> = Queue::new();

for i in 0..limit {
Expand Down
10 changes: 5 additions & 5 deletions benches/rpds_queue_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rpds::QueueSync;
use std::hint::black_box;

fn rpds_queue_sync_enqueue(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue sync enqueue", move |b| {
b.iter(|| {
Expand All @@ -26,7 +26,7 @@ fn rpds_queue_sync_enqueue(c: &mut Criterion) {
}

fn rpds_queue_sync_enqueue_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue sync enqueue mut", move |b| {
b.iter(|| {
Expand All @@ -42,7 +42,7 @@ fn rpds_queue_sync_enqueue_mut(c: &mut Criterion) {
}

fn rpds_queue_sync_dequeue(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue sync dequeue", move |b| {
b.iter_with_setup(
Expand All @@ -67,7 +67,7 @@ fn rpds_queue_sync_dequeue(c: &mut Criterion) {
}

fn rpds_queue_sync_dequeue_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds queue sync dequeue mut", move |b| {
b.iter_with_setup(
Expand All @@ -92,7 +92,7 @@ fn rpds_queue_sync_dequeue_mut(c: &mut Criterion) {
}

fn rpds_queue_sync_iterate(c: &mut Criterion) {
let limit = 10_000;
let limit = 1_000_000;
let mut queue: QueueSync<usize> = QueueSync::new_sync();

for i in 0..limit {
Expand Down
12 changes: 6 additions & 6 deletions benches/rpds_red_black_tree_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rpds::RedBlackTreeMap;
use std::hint::black_box;

fn rpds_red_black_tree_map_insert(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds red black tree map insert", move |b| {
b.iter(|| {
Expand All @@ -26,7 +26,7 @@ fn rpds_red_black_tree_map_insert(c: &mut Criterion) {
}

fn rpds_red_black_tree_map_insert_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds red black tree map insert mut", move |b| {
b.iter(|| {
Expand All @@ -42,7 +42,7 @@ fn rpds_red_black_tree_map_insert_mut(c: &mut Criterion) {
}

fn rpds_red_black_tree_map_remove(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds red black tree map remove", move |b| {
b.iter_with_setup(
Expand All @@ -67,7 +67,7 @@ fn rpds_red_black_tree_map_remove(c: &mut Criterion) {
}

fn rpds_red_black_tree_map_remove_mut(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;

c.bench_function("rpds red black tree map remove mut", move |b| {
b.iter_with_setup(
Expand All @@ -92,7 +92,7 @@ fn rpds_red_black_tree_map_remove_mut(c: &mut Criterion) {
}

fn rpds_red_black_tree_map_get(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;
let mut map = RedBlackTreeMap::new();

for i in 0..limit {
Expand All @@ -109,7 +109,7 @@ fn rpds_red_black_tree_map_get(c: &mut Criterion) {
}

fn rpds_red_black_tree_map_iterate(c: &mut Criterion) {
let limit = 10_000;
let limit = 100_000;
let mut map = RedBlackTreeMap::new();

for i in 0..limit {
Expand Down
Loading

0 comments on commit 0a6de0a

Please sign in to comment.