PistonDevelopers / hematite_nbt

A full-featured Rust crate for working with Minecraft's Named Binary Tag (NBT) file format, including Serde support.
MIT License
99 stars 37 forks source link

Fix performance regression in array serialization #61

Closed caelunshun closed 3 years ago

caelunshun commented 3 years ago

I noticed poor performance when serializing arrays, and profiling revealed that i8_array, i32_array, etc. were allocating a string for each element. Removing the allocation increases performance by an order of magnitude.

atheriel commented 3 years ago

Looks great!