Skip to content

Avoid copying exact bytes before Huffman decoding - #303

Open
notatallshaw wants to merge 1 commit into
python-hyper:masterfrom
notatallshaw:perf/avoid-huffman-input-copy-20261026
Open

notatallshaw wants to merge 1 commit into
python-hyper:masterfrom
notatallshaw:perf/avoid-huffman-input-copy-20261026

Conversation

@notatallshaw

@notatallshaw notatallshaw commented Oct 27, 2026 •

Copy link
Copy Markdown

decode_huffman() copies exact bytes into a bytearray. Skip that copy. Other inputs still use bytearray, including wide or strided memoryviews and subclasses overriding iteration or conversion.

Using this in a real world scenario of interacting with PyPI made 497 Huffman calls, all with exact bytes, removing 497 copies.

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