chairmark

Crates.iochairmark
lib.rschairmark
version0.1.0
sourcesrc
created_at2023-11-28 16:20:22.066845
updated_at2023-11-28 16:20:22.066845
descriptionbenchmarking library without unstable stuff
homepage
repositoryhttps://github.com/Anonym234/chairmark
max_upload_size
id1052129
size23,952
(Anonym234)

documentation

README

Chairmark

A benchmaking library in rust.

quick start

use chairmark::{chair, agg_and_cmp};

// custom function for sorting data
fn bubblesort(data: &mut Vec<u32>) {
    /* your fancy sorting algorithm */
}

fn main() {
    const RUNS: usize = 1_000;
    let prepare = |_| (0u32..1_000).collect();
    let bubblesort = chair_prepare(RUNS, prepare, |mut data| bubblesort(&mut data));
    let std = chair_prepare(RUNS, prepare, |mut data| data.sort());

    let compare = agg_and_cmp![std, bubblesort];
    println!("{}", compare);
}

TODOs

  • add more examples in README
Commit count: 2

cargo fmt