Skip to content

Commit

Permalink
performance comparison: remove "magnetic"
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed May 29, 2024
1 parent 7323b5d commit 605a878
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion performance-comparison/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ publish = false
concurrent-queue = "2.3"
crossbeam-queue = "0.3"
crossbeam-queue-pr338 = { git = "https://github.com/mgeier/crossbeam", branch = "spsc", package = "crossbeam-queue" }
magnetic = "2"
npnc = "0.2"
omango = "0.2"
ringbuf = "0.4"
Expand Down
15 changes: 2 additions & 13 deletions performance-comparison/benches/two_threads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#[macro_use]
mod two_threads;

use magnetic::Consumer as _;
use magnetic::Producer as _;

use ringbuf::traits::Consumer as _;
use ringbuf::traits::Producer as _;
use ringbuf::traits::Split as _;
Expand Down Expand Up @@ -36,23 +33,15 @@ create_two_threads_benchmark!(
|p, i| p.try_push(i).is_ok(),
|c| c.try_pop();

"6-magnetic",
|capacity| {
let buffer = magnetic::buffer::dynamic::DynamicBuffer::new(capacity).unwrap();
magnetic::spsc::spsc_queue(buffer)
},
|p, i| p.try_push(i).is_ok(),
|c| c.try_pop().ok();

"7-concurrent-queue",
"6-concurrent-queue",
|capacity| {
let q = std::sync::Arc::new(concurrent_queue::ConcurrentQueue::bounded(capacity));
(q.clone(), q)
},
|q, i| q.push(i).is_ok(),
|q| q.pop().ok();

"8-crossbeam-queue",
"7-crossbeam-queue",
|capacity| {
let q = std::sync::Arc::new(crossbeam_queue::ArrayQueue::new(capacity));
(q.clone(), q)
Expand Down

0 comments on commit 605a878

Please sign in to comment.