fn parse<'a, E, A>(p: E, b: &mut Bencher, buffer: &'a [u8])
where
    E: Executable<'a, A>,
{
    b.iter(|| {
        let buffer = black_box(buffer);

        match p.execute(buffer, 0) {
            Response {
                v: Some(_),
                o: _,
                c: _,
            } => (),
            Response { v: None, o, c: _ } => panic!("unable parse stream at character {}", o),
        }
    });
}
// -------------------------------------------------------------------------------------------------
// Main parse function used for benchmarking
// -------------------------------------------------------------------------------------------------
Main parse function used for benchmarking
Main parse function used for benchmarking
fn parse<'a, E, A>(p: E, b: &mut Bencher, buffer: &'a [u8])
where
    E: Executable<'a, A>,
{
    b.iter(|| {
        let buffer = black_box(buffer);
        match p.execute(buffer, 0) {
            Response {
                v: Some(_),
                o: _,
                c: _,
            } => (),
            Response { v: None, o, c: _ } => panic!("unable parse stream at character {}", o),
        }
    });
}
fn parse < ' a , E , A > ( p : E , b : & mut Bencher , buffer : & ' a [ u8 ] ) where E : Executable < ' a , A > , { b . iter ( | | { let buffer = black_box ( buffer ) ; match p . execute ( buffer , 0 ) { Response { v : Some ( _ ) , o : _ , c : _ , } => ( ) , Response { v : None , o , c : _ } => panic ! ( " " o ) , } } ) ; }
Main parse function used for benchmarking
Main parse function used for benchmarking
p
E
b
&mut Bencher
buffer
&'a [u8]
p
E
b
&mut Bencher
buffer
&'a [u8]