Skip to content

perf: batch HPACK encoder writes per u32 - #938

Open
seanmonstar wants to merge 1 commit into
masterfrom
sean/lopkmsvnttxu
Open

perf: batch HPACK encoder writes per u32#938
seanmonstar wants to merge 1 commit into
masterfrom
sean/lopkmsvnttxu

Conversation

@seanmonstar

Copy link
Copy Markdown
Member

This accumulates HPACK encoding into a u32, and then writes to the buffer with put_u32, instead of put_u8 for each byte. Seems to improve HPACK encoding performance a nice amount:

Input Before After Improvement
www.example.com 94.67 ns 58.07 ns 39% faster
Typical header value 401.02 ns 169.01 ns 58% faster
Long ASCII value 564.40 ns 272.63 ns 52% faster
All 256 octets 4.603 µs 1.649 µs 64% faster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant