| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Thanks for the PR! bit_length can be useful in low-level code, where a generic method call can really slow things down.
Sorry, something went wrong.
|
I'm not entirely sure how to proceed here, I can't think of any reason our use of getattr would lead to segfault behavior where there was none before |
Sorry, something went wrong.
There was a problem hiding this comment.
I think I found an issue. Also can you measure the perf difference using a micro-benchmark?
Sorry, something went wrong.
Will this benchmark suffice? I can deploy this commit hash and compare against 1.18 which I already have benchmarked here |
Sorry, something went wrong.
1.18 vs this branch There was a ~6% increase in speed for various permutations of the int_to_big_endian benchmark which includes not only a call to bit_length but a decent bit of other stuff as well |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks, looks good now!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR adds a new primitive for int.bit_length and is already ready for review.