-
Notifications
You must be signed in to change notification settings - Fork 32
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
Consider extracting the first limb into a separate field #43
Comments
Another option would be to consider Zero the one with empty limbs (which is what https://github.com/SciNim/megalo does) |
I did try some "small BigInt optimization", but when I benchmarked it, I haven't noticed any measurable improvements. But there's a possibility that my tests weren't great and/or my implementation wasn't good enough. |
14 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
BigInt
is defined as follows:It has the invariant that
limbs.len >= 1
.It might be worth it changing that to
This has several advantages:
BigInt
s require no allocation & pointer indirection.Disadvantages:
The text was updated successfully, but these errors were encountered: