Skip to content

Commit 2a90318

Browse files
committed
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.
1 parent c897189 commit 2a90318

File tree

1 file changed

+4107
-4493
lines changed

1 file changed

+4107
-4493
lines changed

0 commit comments

Comments
 (0)