1
0
Fork 0
mirror of https://github.com/azalea-rs/simdnbt.git synced 2025-08-02 07:26:04 +00:00

rename realworld to hypixel

This commit is contained in:
mat 2024-05-18 03:12:06 +00:00
parent c05ac6ee43
commit eb960e076e
7 changed files with 10 additions and 9 deletions

View file

@ -53,7 +53,7 @@ name = "compare"
[[bench]]
harness = false
name = "compare_realworld"
name = "compare_hypixel"
[[bench]]
harness = false

View file

@ -22,7 +22,7 @@ pub fn bench_read_file(filename: &str, c: &mut Criterion) {
}
let input = input.as_slice();
let mut group = c.benchmark_group(format!("compare_realworld/{filename}"));
let mut group = c.benchmark_group(format!("compare_hypixel/{filename}"));
group.throughput(Throughput::Bytes(input.len() as u64));
{
@ -353,7 +353,7 @@ fn graphite_items_from_nbt(nbt: graphite_binary::nbt::NBT) -> Option<Vec<Option<
}
fn bench(c: &mut Criterion) {
bench_read_file("realworld.nbt", c);
bench_read_file("hypixel.nbt", c);
}
criterion_group!(benches, bench);

View file

@ -48,10 +48,11 @@ fn bench_file(filename: &str, c: &mut Criterion) {
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
fn bench(c: &mut Criterion) {
bench_file("bigtest.nbt", c);
bench_file("simple_player.dat", c);
bench_file("hypixel.nbt", c);
bench_file("complex_player.dat", c);
bench_file("level.dat", c);
bench_file("bigtest.nbt", c);
bench_file("simple_player.dat", c);
// bench_file("stringtest.nbt", c);
// bench_file("inttest16.nbt", c);

View file

@ -65,7 +65,7 @@ pub struct Base {
}
fn main() {
let input = black_box(include_bytes!("../tests/realworld.nbt"));
let input = black_box(include_bytes!("../tests/hypixel.nbt"));
for _ in 0..1 {
let nbt = simdnbt::borrow::read(&mut Cursor::new(input));

View file

@ -100,7 +100,7 @@ fn items_from_nbt(nbt: BaseNbt) -> Option<Vec<Option<Item>>> {
}
fn main() {
let input = black_box(include_bytes!("../tests/realworld.nbt"));
let input = black_box(include_bytes!("../tests/hypixel.nbt"));
for _ in 0..1 {
let nbt = simdnbt::borrow::read(&mut Cursor::new(input));

View file

@ -458,8 +458,8 @@ mod tests {
}
#[test]
fn read_realworld() {
let src = include_bytes!("../../tests/realworld.nbt").to_vec();
fn read_hypixel() {
let src = include_bytes!("../../tests/hypixel.nbt").to_vec();
let _nbt = Nbt::read(&mut Cursor::new(&src[..])).unwrap().unwrap();
}