Repository navigation
Conversation
Bodigrim
reviewed
Oct 24, 2026
Bodigrim
reviewed
Oct 24, 2026
Lysxia
force-pushed
the
integer
branch
2 times, most recently
from
October 24, 2026 20:00
79b9aa3 to
7d03af5
Compare
Contributor
|
macOS needs to be pinned to 15 instead of latest, if you want to fix CI prior to merging. |
Bodigrim
approved these changes
Oct 24, 2026
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.
Close #713
integerseems to be repeated branches to test whether we are in base 10 or base 16. This is solved by parameterizingintegerby everything that depends on the bases upfront.maxIntandmaxDigitswere computed in a loop, which prevents inlining them and wastes a register to store them. We replace them with more direct formulas that can be computed at compile time. (There is still a loop that remains forIntsize smaller than 32 bits which I doubt ever happens. And if one wants, they can add another special case for 128 bits, but falling back to the 64-bit formula is at least correct)go, I removed the first branchn < maxIntbecause it turns out the second also handles this case correctly, just with an extra multiplication and division. This is only a slight pessimization for a thin subset of single-word values that don't fit anInt(between 2^63 and 2^64).Added a benchmark suite. With this we are faster than
pack . showacross the board.