Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use const array for unrolled Huffman table
Motivation We've spent a long time with an unrolled Huffman-table to optimize the Huffman decoding of HPACK headers. This works well, but because of some limitations in Swift it's been impossible to embed this structure in the binary directly: we've always had to alloc-and-copy on startup. Additionally, due to type checker performance limitations, we've been Base64 decoding it on startup, which isn't great either. The introduction of const allows us to embed the knowledge of the fact that this structure is compile-time constant in to the binary, improving performance. Modifications Revert to the old layout, constify, and remove anything that blocks that. Result Hopefully better performance and less dirty memory.
- Loading branch information