pub fn diff_different(c: &mut Criterion) {
    let mut group = c.benchmark_group("diff different");

    let values = (CHAR_0, CHAR_1);
    group.bench_with_input("character", &values, |b, (left, right)| {
        let mut f = NullWriter {};
        b.iter(|| write!(f, "{}", Comparison::new(left, right)))
    });

    let values = (STRING_0, STRING_1);
    group.bench_with_input("64 char string", &values, |b, (left, right)| {
        let mut f = NullWriter {};
        b.iter(|| write!(f, "{}", Comparison::new(left, right)))
    });

    let values = (BLOCK_0, BLOCK_1);
    group.bench_with_input("64x64 char block", &values, |b, (left, right)| {
        let mut f = NullWriter {};
        b.iter(|| write!(f, "{}", Comparison::new(left, right)))
    });

    group.finish();
}
/// We only care about comparing different items, as when items are the same
/// we never compute the diff.
We only care about comparing different items, as when items are the same
we never compute the diff.
We only care about comparing different items as when items are the same we never compute the diff .
pub fn diff_different(c: &mut Criterion) {
    let mut group = c.benchmark_group("diff different");
    let values = (CHAR_0, CHAR_1);
    group.bench_with_input("character", &values, |b, (left, right)| {
        let mut f = NullWriter {};
        b.iter(|| write!(f, "{}", Comparison::new(left, right)))
    });
    let values = (STRING_0, STRING_1);
    group.bench_with_input("64 char string", &values, |b, (left, right)| {
        let mut f = NullWriter {};
        b.iter(|| write!(f, "{}", Comparison::new(left, right)))
    });
    let values = (BLOCK_0, BLOCK_1);
    group.bench_with_input("64x64 char block", &values, |b, (left, right)| {
        let mut f = NullWriter {};
        b.iter(|| write!(f, "{}", Comparison::new(left, right)))
    });
    group.finish();
}
pub fn diff_different ( c : & mut Criterion ) { let mut group = c . benchmark_group ( " " ) ; let values = ( CHAR_0 , CHAR_1 ) ; group . bench_with_input ( " " , & values , | b , ( left , right ) | { let mut f = NullWriter { } ; b . iter ( | | write ! ( f " " Comparison new ( left right ) ) ) } ) ; let values = ( STRING_0 , STRING_1 ) ; group . bench_with_input ( " " , & values , | b , ( left , right ) | { let mut f = NullWriter { } ; b . iter ( | | write ! ( f " " Comparison new ( left right ) ) ) } ) ; let values = ( BLOCK_0 , BLOCK_1 ) ; group . bench_with_input ( " " , & values , | b , ( left , right ) | { let mut f = NullWriter { } ; b . iter ( | | write ! ( f " " Comparison new ( left right ) ) ) } ) ; group . finish ( ) ; }
We only care about comparing different items, as when items are the same
we never compute the diff.
We only care about comparing different items as when items are the same we never compute the diff .
c
&mut Criterion
c
&mut Criterion