mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 16:44:06 +02:00
add reserve_int
This commit is contained in:
parent
c321c5a252
commit
227582cbc4
3 changed files with 35 additions and 1 deletions
15
benches/write.rs
Normal file
15
benches/write.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
use bitbuffer::{BitWriteStream, LittleEndian};
|
||||
use iai::black_box;
|
||||
|
||||
fn write_int_le() {
|
||||
let mut out = Vec::with_capacity(128);
|
||||
{
|
||||
let mut write = BitWriteStream::new(&mut out, LittleEndian);
|
||||
for i in 0..128 {
|
||||
write.write_sized(&black_box(i), 7).unwrap();
|
||||
}
|
||||
}
|
||||
black_box(out);
|
||||
}
|
||||
|
||||
iai::main!(write_int_le);
|
||||
Loading…
Add table
Add a link
Reference in a new issue