1
0
Fork 0
mirror of https://github.com/azalea-rs/simdnbt.git synced 2025-08-02 23:44:40 +00:00
simdnbt/README.md
2023-09-03 03:31:23 -05:00

932 B

simdnbt

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

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 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.