-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Optimize integer-->string conversions #36470
Conversation
Awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty performance-sensitive operation, so unrolling those loops is a great idea.
@rfourquet, I appreciate your comment I added the clamping into the I don't know the reason, but there is a little slowdown (~1 ns/number) from the original commit, but the unrolling is still effective. |
Bumping this. I don't have any objections to merging this. |
Since PR #36459 was merged, the |
Looks like this PR has been approved, is it ok to merge? |
This avoids invalidations caused by invalidating `StringVector(::Integer)`. This also makes `bin()`, `dec`() and `hex()` slightly faster, but does not change the Printf.
I've kicked off the failed CI runs, which looked unrelated. This seems good once CI passes. |
Thanks! |
I'm sorry, but I may have broken something. Edit: Line 633 in 36effbe
Can you fix this on the BitIntegers.jl side? (cf. rfourquet/BitIntegers.jl#13) |
@kimikage Thank you for the report, I had no idea this |
This avoids invalidations caused by invalidating(Edit: The problem has been solved by PR #36459.)StringVector(::Integer)
. (cf. PR #36459)This also makes
bin()
,dec()
andhex()
slightly faster, but does not change the Printf.