-
-
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
faster digits(::BigInt) #37075
faster digits(::BigInt) #37075
Conversation
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.
Should use 4-space indentation.
Could this be implemented as a method of |
Oh, I didn't even realize that we had a |
Switched to |
I'm reluctant to get even more into the weeds here, but this is a release blocker, so perhaps it's warranted. The double allocation feels unfortunate, but of course, as long as the output here is Lines 682 to 695 in 613af3c
That would also avoid the multiple calls to |
Well, Of course, even with a wider integer type you could |
I played around with a bit, and it seems like getting a performance boost from avoiding the extra |
Codecov Report
@@ Coverage Diff @@
## master #37075 +/- ##
==========================================
+ Coverage 86.15% 86.16% +0.01%
==========================================
Files 351 351
Lines 66130 66130
==========================================
+ Hits 56971 56984 +13
+ Misses 9159 9146 -13
Continue to review full report at Codecov.
|
Since this is a blocking issue for Julia 1.6, this is about 50x faster for
digits(factorial(big(100)))
.