1
0
Fork 0
mirror of https://github.com/azalea-rs/simdnbt.git synced 2025-08-02 15:36:03 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
mat
be87181bd9 bump version 2025-07-31 09:08:10 +07:00
mat
7d21ac3ac7 mention enable-dfa-jump-thread in readme 2025-07-30 17:07:00 -09:00
3 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,11 @@
[workspace]
members = ["simdnbt", "simdnbt-derive", "fuzz"]
resolver = "2"
[profile.release]
lto = true
debug = false
[profile.bench]
lto = true
debug = true

View file

@ -1,6 +1,6 @@
[package]
name = "simdnbt"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
description = "an unnecessarily fast nbt decoder"
license = "MIT"
@ -17,6 +17,7 @@ thiserror = "2.0.12"
[dev-dependencies]
criterion = { version = "0.5.1", features = ["html_reports"] }
mimalloc = "0.1.43"
graphite_binary = "0.1.0"
valence_nbt = { version = "0.8.0", features = ["binary"] }
@ -24,8 +25,6 @@ fastnbt = "2.5.0"
azalea-nbt = { git = "https://github.com/azalea-rs/azalea", rev = "84e036ce3752ecf57904b0f5aff1f33d43e95a32" }
hematite-nbt = { version = "0.5.2", default-features = false }
shen-nbt5 = "0.4.6"
mimalloc = "0.1.43"
crab_nbt = "0.2.9"
ussr-nbt = "0.2.1"

View file

@ -54,7 +54,11 @@ nbt.write(&mut buffer);
Use the borrow variant of `Nbt` if possible, and avoid allocating unnecessarily (for example, keep strings as `Cow<str>` if you can).
If you're using the owned variant of Simdnbt, switching to a faster allocator like [mimalloc](https://docs.rs/mimalloc/latest/mimalloc/) may help a decent amount (it's ~20% faster on my machine). Setting `RUSTFLAGS='-C target-cpu=native'` when running your code may also help or hurt performance.
If you're using the owned variant of Simdnbt, switching to a faster allocator like [mimalloc](https://docs.rs/mimalloc/latest/mimalloc/) may help a decent amount (it's ~20% faster on my machine).
Using `RUSTFLAGS="-Cllvm-args=-enable-dfa-jump-thread"` makes Simdnbt about 4% faster in exchange for potentially slightly longer compile times and compiler instability.
Setting `RUSTFLAGS='-C target-cpu=native'` when running your code may help or hurt performance, depending on your computer and program.
## Implementation details