1
0
Fork 0
mirror of https://github.com/azalea-rs/simdnbt.git synced 2025-08-02 15:36:03 +00:00
an unnecessarily fast nbt decoder
Find a file
mat d427ea3f55 Release 0.3.0
simdnbt@0.3.0
simdnbt-derive@0.3.0

Generated by cargo-workspaces
2023-12-02 13:54:12 -06:00
simdnbt Release 0.3.0 2023-12-02 13:54:12 -06:00
simdnbt-derive Release 0.3.0 2023-12-02 13:54:12 -06:00
.gitignore more silly string optimizations 2023-09-03 03:03:43 -05:00
Cargo.toml derive macro 2023-11-18 22:54:15 -06:00
LICENSE add stuff to Cargo.toml 2023-08-29 23:04:24 -05:00
README.md derive macro 2023-11-18 22:54:15 -06:00
rust-toolchain set azalea-nbt commit rev since it was removed 2023-11-28 11:48:07 -06:00

simdnbt

a very fast nbt serializer and deserializer.

simdnbt currently makes use of simd instructions for two things:

  • swapping the endianness of int arrays
  • checking if a string is plain ascii for faster mutf8 to utf8 conversion

simdnbt might be the fastest nbt decoder currently in existence. however to achieve this silly speed, it takes a couple of shortcuts:

  1. it requires a reference to the original data (to avoid cloning)
  2. it doesn't validate/decode the mutf-8 strings at decode-time

here's a benchmark comparing simdnbt against a few of the other fastest nbt crates (though without actually accessing the data):

simdnbt is ~3x faster than the second fastest nbt crate

and here's a benchmark where it accesses the data and makes it owned:

simdnbt is only about 50% faster than the second fastest in this one