Repository navigation
perf(rust): toFixed in machine arithmetic - #91
Merged
Merged
Conversation
hearnadam
force-pushed
the
perf/stack-08-tofixed
branch
from
November 26, 2026 17:20
27a7044 to
9202aa7
Compare
kommander
force-pushed
the
perf/stack-08-tofixed
branch
5 times, most recently
from
November 26, 2026 22:54
5ef35d9 to
84dc024
Compare
It formatted every number to 1,100 decimal places and cut the text. The scaled product's rounding error comes from a fused multiply-add, which says which way the true value rounds; the exact path stays for what that cannot decide. A test holds the two equal on over 500,000 cases.
kommander
force-pushed
the
perf/stack-08-tofixed
branch
from
November 26, 2026 22:55
84dc024 to
fbbcebb
Compare
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.
It formatted every number to 1,100 decimal places and cut the text. The scaled
product's rounding error comes from a fused multiply-add, which says which way
the true value rounds; the exact path stays for what that cannot decide. A test
holds the two equal on over 500,000 cases.
Part 8 of 11 in a stack; based on
perf/stack-07-bigint. Each part was built, linted and tested on its own (cargo test --release --workspace, the same underPSYCHOSCRIPT_GC_STRESS=1, and the conformance cases underPSYCHOSCRIPT_ROUNDTRIP=1). Numbers are instructions retired, fromrust/bench/examples/corpusandmem_probe(part 1).