mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-29 05:24:22 +00:00
Motivation: Huffman decoding has rapidly become one of the most expensive parts of the program. Some of the code here is unavoidably expensive, but there is some unnecessary checked arithmetic here on offset. Removing that provides a small but meaningful improvement to the performance of this function. Modifications: - Remove the checked arithmetic on offset, which is bounded by a previous operation that was already checked. Result: This function gets cheaper by about 4%, though the benchmark as a whole only sees a 0.1% improvement.