Closed kornelski closed 1 year ago
This makes state match a bit less busy. Additionally, it avoids reallocating decoder and its buffers when possible, which gives up to 3% speed improvement in benchmarks.
match
Separate lzw decoder will be handy later when I implement ability to return LZW-compressed frames, and then decode them in parallel https://github.com/image-rs/image-gif/pull/144#issuecomment-1492163801
@HeroicKatora Are you okay with refactorings like that? Shall I continue with micro optimizations?
This makes state
match
a bit less busy. Additionally, it avoids reallocating decoder and its buffers when possible, which gives up to 3% speed improvement in benchmarks.Separate lzw decoder will be handy later when I implement ability to return LZW-compressed frames, and then decode them in parallel https://github.com/image-rs/image-gif/pull/144#issuecomment-1492163801