/// Benchmark decoding a FIDL struct containing a single uint64 field
Benchmark decoding a FIDL struct containing a single uint64 field
Benchmark decoding a FIDL struct containing a single uint64 field
fn int64struct_decode(b: &mut Bencher) {
    b.iter_batched(
        || {
            let bytes = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08];
            let handles = [];
            let value = Int64Struct::new_empty();
            (bytes, handles, value)
        },
        |test_data| {
            let (mut bytes, mut handles, mut value) = test_data;
            Decoder::decode_with_context(V1_CONTEXT, &mut bytes, &mut handles, &mut value).unwrap();
        },
        BatchSize::SmallInput,
    );
}
fn int64struct_decode ( b : & mut Bencher ) { b . iter_batched ( | | { let bytes = [ 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 ] ; let handles = [ ] ; let value = Int64Struct :: new_empty ( ) ; ( bytes , handles , value ) } , | test_data | { let ( mut bytes , mut handles , mut value ) = test_data ; Decoder :: decode_with_context ( V1_CONTEXT , & mut bytes , & mut handles , & mut value ) . unwrap ( ) ; } , BatchSize :: SmallInput , ) ; }
Benchmark decoding a FIDL struct containing a single uint64 field
Benchmark decoding a FIDL struct containing a single uint64 field
b
&mut Bencher