8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
ed9be47
ba70518
34315cb
0ef383c
c00ba8c
2b5163f
955bb37
237b8b9
11ad06f
c25b910
37a5c9a
2cb1aec
99c5420
2724758
2a8692d
af410e0
5a9e201
5760c95
1f81b87
f4d74d2
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Depending on the INT_TYPE the value of ndigits can only be 2 or 3. We can replace the while loop with a single if statement. E.g.
INT_TYPE
main...eendebakpt:cpython:fast_digit_count
@srinivasreddy Would you be interested in benchmarking this approach and making a PR?
Sorry, something went wrong.
Yes. Absolutely.
or 3
I do not think this works on a platform where e.g. long long is 128 bit? Or for PYLONG_BITS_IN_DIGIT=15 and long long being 64bit? Maybe both hypothetical, but not impossible.
long long
PYLONG_BITS_IN_DIGIT=15
Correct. We would need some guards for that. Whether that bit of complexity is worth is, depends on the benchmark results.