MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / bench_binary_heap_decode

Function bench_binary_heap_decode

src/derive/vec.rs:373–382  ·  view source on GitHub ↗
(b: &mut test::Bencher)

Source from the content-addressed store, hash-verified

371 // BinaryHeap can't use bench_encode_decode because it doesn't implement PartialEq.
372 #[bench]
373 fn bench_binary_heap_decode(b: &mut test::Bencher) {
374 type T = BinaryHeap<u8>;
375 let data: T = bench_data();
376 let encoded = crate::encode(&data);
377 b.iter(|| {
378 let decoded: T = crate::decode::<T>(&encoded).unwrap();
379 debug_assert!(data.iter().eq(decoded.iter()));
380 decoded
381 })
382 }
383}

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.85
bench_dataFunction · 0.70

Tested by

no test coverage detected