memorysafety / zlib-rs

A safer zlib
zlib License
75 stars 6 forks source link

remove bounds check in `deflate::Window::filled` #92

Closed folkertdev closed 1 month ago

folkertdev commented 2 months ago

The influence on performance is hard to measure, but this change causes a big decrease in the number of instructions executed.

(my guess is that this is the jump instruction, which in practice is just always predicted correctly so the performance gain is minimal)