-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove unnecessary string casting of bytes
#276
Conversation
To call out the explicit: is this a behaviour change or a performance improvement? If its a performance related change, I would like to see a benchmark showing "time spent" or similar metrics that changed. |
Great call! Thanks to your prompt I actually timed the new version and improved it even further (code will be pushed when you are reading this). So this should keep the same behavior in terms of types. The caveat is, the original version always returns a new bytes object due to the
As you can see it is consistently faster than the old version for both These numbers are using Python 3.10.12. When using Python 3.12.4, they are even better:
|
Ref python-hyper/h2#1286