From 0e32cbd4b8bbf9a0f64e7fab14995b6cd997a7cb Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 13 May 2024 02:32:53 +0000 Subject: [PATCH] add #[inline(always)] to read_with_type --- simdnbt/README.md | 2 +- simdnbt/src/borrow/mod.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/simdnbt/README.md b/simdnbt/README.md index 19a4bc5..275ec86 100644 --- a/simdnbt/README.md +++ b/simdnbt/README.md @@ -77,7 +77,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.0900 GiB/s | +| [simdnbt::borrow](https://docs.rs/simdnbt/latest/simdnbt/borrow/index.html) | 1.7619 GiB/s | | [simdnbt::owned](https://docs.rs/simdnbt/latest/simdnbt/owned/index.html) | 329.10 MiB/s | | [shen_nbt5](https://docs.rs/shen-nbt5/latest/shen_nbt5/) | 306.58 MiB/s | | [azalea_nbt](https://docs.rs/azalea-nbt/latest/azalea_nbt/) | 297.28 MiB/s | diff --git a/simdnbt/src/borrow/mod.rs b/simdnbt/src/borrow/mod.rs index 143ca9b..67e2755 100644 --- a/simdnbt/src/borrow/mod.rs +++ b/simdnbt/src/borrow/mod.rs @@ -155,6 +155,7 @@ impl<'a> NbtTag<'a> { } } + #[inline(always)] fn read_with_type( data: &mut Cursor<&'a [u8]>, alloc: &TagAllocator<'a>,