Let's put the crossbeam-epoch Treiber stack through the wringer to get an idea of the performance of this approach. Key areas of interest for us will be:
- Push/pop cycles per second
- Memory behavior, high-water mark, and what not
- cache behavior
We'll run our programs on x86 and ARM, like we did in previous chapters. Our exercise program, similar to the hazard pointer program from the previous section:
extern crate crossbeam; #[macro_use] extern crate lazy_static; extern crate num_cpus; extern crate quantiles; use crossbeam::sync::TreiberStack; use quantiles::ckms::CKMS; use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering}; use std::{thread, time}; lazy_static! { static ref WORKERS: AtomicUsize ...