Skip to content

update xxhash#20

Open
Vizonex wants to merge 1 commit intolitespeedtech:masterfrom
Vizonex:update-xxhash
Open

update xxhash#20
Vizonex wants to merge 1 commit intolitespeedtech:masterfrom
Vizonex:update-xxhash

Conversation

@Vizonex
Copy link

@Vizonex Vizonex commented Sep 29, 2025

So I ended up finding this library since I am planning to give aiohttp http/2 support, and I have already started writing a new frame-parser called llh2 which will hopefully be the new frame-parser. With that I needed a pure C implementation of hpack to use and this just seems to fit with what I have been asking for. My main objectives involve getting python-hyper to start looking into Cython a bit more and start getting off pure python implementations which can be a deadly bottleneck. This library seems to be efficient enough for my own use (and I sure hope its thread-safe as well).

With that I found something to change and that should've been done a long time ago and that was attempting to update the xxhash dependency. I tested to make sure it at least compiles and sure enough it does.

@dtikhonov
Copy link
Collaborator

Thanks for the PR! I am happy that ls-hpack has found another use.

Why do you think this update is necessary? Is it performance?

@Vizonex
Copy link
Author

Vizonex commented Oct 5, 2025

Thanks for the PR! I am happy that ls-hpack has found another use.

Why do you think this update is necessary? Is it performance?

It is :) and on top of that it's the new demand for tooling with a library called aiohttp were looking to add http/2 support.

@dtikhonov
Copy link
Collaborator

I see -- thank you.

Well, I don't maintain this repo anymore, but I am sure that the performance aspect will pique the interest of @litespeedtech.

@Vizonex
Copy link
Author

Vizonex commented Oct 6, 2025

@dtikhonov I hope so too since I might be wrapping this to Cython to create a faster version of python hpack. I just hope it's threadsafe and can work under heavy loads.

@dtikhonov
Copy link
Collaborator

I would be interested in collaborating or exchanging ideas of how to integrate ls-hpack. In particular, the actual compression performance (compression ratio) can be improved by enhancing the mnemonic technique logic which was ported from ls-qpack.

With regard to thread-safety and performance, I am sure ls-hpack delivers in both respects. This library has been working in a sizable chunk of the web for years.

Regarding XXH performance, what kind of profiling have you done so far? I already optimized two of the most expensive parts, the Huffman decoder and encoder.

@dtikhonov
Copy link
Collaborator

@Vizonex you did not answer my question: What kind of profiling have you done?

Also I am curious why aiohttp requires that ls-hpack use newew XXH...

@Vizonex
Copy link
Author

Vizonex commented Oct 31, 2025

@Vizonex you did not answer my question: What kind of profiling have you done?

Also I am curious why aiohttp requires that ls-hpack use newew XXH...

I mainly wanted to see if updating xxhash would be an performance improvement mainly.

@dtikhonov
Copy link
Collaborator

Well, I am asking you that! 🙂 I mean, you are the one who wants to change things... so I am asking that you substantiate.

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.

2 participants