Skip to content

Commit

Permalink
Add Collector
Browse files Browse the repository at this point in the history
  • Loading branch information
marc0246 committed Jun 15, 2024
1 parent a70e60e commit 17373c7
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 63 deletions.
3 changes: 1 addition & 2 deletions benches/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

extern crate test;

use concurrent_slotmap::epoch;
use std::{sync::RwLock, thread};
use test::{black_box, Bencher};

Expand All @@ -12,7 +11,7 @@ const THREADS: u32 = 10;
#[bench]
fn concurrent_slotmap(b: &mut Bencher) {
b.iter(|| {
let map = concurrent_slotmap::SlotMap::new(ITERATIONS, epoch::GlobalHandle::new());
let map = concurrent_slotmap::SlotMap::new(ITERATIONS);
let id = map.insert([0usize; 2], map.global().register_local().pin());

thread::scope(|s| {
Expand Down
3 changes: 1 addition & 2 deletions benches/insert-remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

extern crate test;

use concurrent_slotmap::epoch;
use std::{sync::RwLock, thread};
use test::{black_box, Bencher};

Expand All @@ -12,7 +11,7 @@ const THREADS: u32 = 10;
#[bench]
fn concurrent_slotmap(b: &mut Bencher) {
b.iter(|| {
let map = concurrent_slotmap::SlotMap::new(ITERATIONS, epoch::GlobalHandle::new());
let map = concurrent_slotmap::SlotMap::new(ITERATIONS);

thread::scope(|s| {
for _ in 0..THREADS {
Expand Down
3 changes: 1 addition & 2 deletions benches/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

extern crate test;

use concurrent_slotmap::epoch;
use std::{sync::RwLock, thread};
use test::{black_box, Bencher};

Expand All @@ -12,7 +11,7 @@ const THREADS: u32 = 10;
#[bench]
fn concurrent_slotmap(b: &mut Bencher) {
b.iter(|| {
let map = concurrent_slotmap::SlotMap::new(ITERATIONS, epoch::GlobalHandle::new());
let map = concurrent_slotmap::SlotMap::new(ITERATIONS);

thread::scope(|s| {
for _ in 0..THREADS {
Expand Down
Loading

0 comments on commit 17373c7

Please sign in to comment.