mirror of
https://github.com/azalea-rs/simdnbt.git
synced 2025-08-02 07:26:04 +00:00
inline read_with_type for 12% speedup
This commit is contained in:
parent
2a9a1ca8d7
commit
5cf042edb4
1 changed files with 1 additions and 0 deletions
|
@ -226,6 +226,7 @@ impl NbtTag {
|
|||
unsafe { *<*const _>::from(self).cast::<u8>() }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn read_with_type(data: &mut Cursor<&[u8]>, tag_type: u8, depth: usize) -> Result<Self, Error> {
|
||||
match tag_type {
|
||||
BYTE_ID => Ok(NbtTag::Byte(
|
||||
|
|
Loading…
Add table
Reference in a new issue