mirror of
https://github.com/azalea-rs/simdnbt.git
synced 2025-08-02 07:26:04 +00:00
update borrow benchmarks in readme
This commit is contained in:
parent
150a00cb29
commit
d019003a3a
2 changed files with 10 additions and 10 deletions
|
@ -76,7 +76,7 @@ Here's a benchmark comparing Simdnbt against a few of the other fastest NBT crat
|
|||
|
||||
| Library | Throughput |
|
||||
| --------------------------------------------------------------------------- | ------------ |
|
||||
| [simdnbt::borrow](https://docs.rs/simdnbt/latest/simdnbt/borrow/index.html) | 1.9725 GiB/s |
|
||||
| [simdnbt::borrow](https://docs.rs/simdnbt/latest/simdnbt/borrow/index.html) | 3.9493 GiB/s |
|
||||
| [simdnbt::owned](https://docs.rs/simdnbt/latest/simdnbt/owned/index.html) | 825.59 MiB/s |
|
||||
| [shen_nbt5](https://docs.rs/shen-nbt5/latest/shen_nbt5/) | 606.68 MiB/s |
|
||||
| [graphite_binary](https://docs.rs/graphite_binary/latest/graphite_binary/) | 363.94 MiB/s |
|
||||
|
@ -89,9 +89,9 @@ And for writing `complex_player.dat`:
|
|||
|
||||
| Library | Throughput |
|
||||
| --------------- | ------------ |
|
||||
| simdnbt::borrow | 2.6116 GiB/s |
|
||||
| simdnbt::owned | 2.5033 GiB/s |
|
||||
| azalea_nbt | 2.4152 GiB/s |
|
||||
| simdnbt::borrow | 2.1317 GiB/s |
|
||||
| graphite_binary | 1.8804 GiB/s |
|
||||
|
||||
The tables above were made from the [compare benchmark](https://github.com/azalea-rs/simdnbt/tree/master/simdnbt/benches) in this repo.
|
||||
|
|
|
@ -33,14 +33,14 @@ fn bench_file(filename: &str, c: &mut Criterion) {
|
|||
});
|
||||
|
||||
let nbt = simdnbt::borrow::read(&mut input_stream).unwrap().unwrap();
|
||||
group.bench_function("Get", |b| {
|
||||
b.iter(|| {
|
||||
let level = nbt.compound("abilities").unwrap();
|
||||
for (k, _) in level.iter() {
|
||||
black_box(level.get(black_box(&k.to_str())));
|
||||
}
|
||||
})
|
||||
});
|
||||
// group.bench_function("Get", |b| {
|
||||
// b.iter(|| {
|
||||
// let level = nbt.compound("abilities").unwrap();
|
||||
// for (k, _) in level.iter() {
|
||||
// black_box(level.get(black_box(&k.to_str())));
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
group.finish();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue