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
2023-09-02 22:12:24 -05:00
benches optimized converting mutf8 to utf8 2023-09-02 22:12:24 -05:00
examples improve docs 2023-08-28 22:51:32 -05:00
src optimized converting mutf8 to utf8 2023-09-02 22:12:24 -05:00
tests optimized converting mutf8 to utf8 2023-09-02 22:12:24 -05:00
.gitignore improve docs 2023-08-28 22:51:32 -05:00
Cargo.toml add stuff to Cargo.toml 2023-08-29 23:04:24 -05:00
LICENSE add stuff to Cargo.toml 2023-08-29 23:04:24 -05:00
README.md calling it simdnbt is no longer a lie 2023-08-29 19:52:01 -05:00

simdnbt

an unnecessarily fast nbt decoder. like seriously you probably don't need this unless you're trying to win benchmarks.

simdnbt currently only makes use of simd instructions for swapping the endianness of arrays, and tbh that's really only there so i can call it "simdnbt" without lying. the name is mostly a play on simdjson.

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 with the two other fastest nbt crates (azalea-nbt was also made by me): simdnbt is ~3x faster than the second fastest nbt crate

take this with a grain of salt as they're not all doing the same work. regardless, you can still see it's very fast.