Add 62 bit limb implementation, script and update benches#66
Merged
Conversation
WIP Add 62 bit limb implementation, script and update benches
BobWall23
requested changes
Dec 12, 2025
| y.const_lt(self).not() | ||
| } | ||
|
|
||
| #[inline] |
Member
There was a problem hiding this comment.
This doesn't cover the case where they are equal.
Member
Author
There was a problem hiding this comment.
I think it does. In both const_gt and const_lt if they're equal the value 0 is produced, which is correct.
Do you see something I'm missing?
Member
There was a problem hiding this comment.
I'm sorry - I had a brain cramp.
Co-authored-by: Bob Wall <bob.wall@ironcorelabs.com>
BobWall23
approved these changes
Dec 12, 2025
| y.const_lt(self).not() | ||
| } | ||
|
|
||
| #[inline] |
Member
There was a problem hiding this comment.
I'm sorry - I had a brain cramp.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a full implementation of the 62 bit limb version of gridiron. In the process I discovered that the ff31 version doesn't port directly. There are some bitshifts that are different because of the limb sizes changing. The property based tests give us a high confidence in the changes.
This is a breaking change because the default has changed to 62 bit. The only time you wouldn't want this is WASM (or some other niche 32 bit arch). The README has been updated to give all this info.
I've also included a python script that will calculate the values for the macro invocation. This used to be done only in sage, but it can be done with normal python as well.
This new implementation is about twice as fast as the old one on 64 bit archs.
Closes #12.