Closed kornelski closed 5 months ago
Thanks, any measurements?
I've not really done much work on this being busy with other projects for the last few years and @Frommi has been nowhere to be seen so there's probably a lot of room for optimization and improvement with updates to Rust in the meantime.
I'm using cargo-show-asm
to verify, and for example init_tree
has 20% fewer instructions.
Manual bounds checks optimize better, because they don't have additional side effects, and don't need to set a unique panic location each time.
input = &input[in_consumed..]
optimizes better than advancingin_pos
.There's a ton more panics in
decompress
.