Repository navigation
A spring keeps its last answer for tracks asking at the same time - #600
Merged
Merged
Conversation
A tween's tracks share its ease and its timing. A list's rows moving together (a `ui.each` reorder, the layout boxes' default spring) each asked the same spring for the same time every frame: two tracks a row, each an exp, a sine and a cosine, a thousand rows a frame for the same number. The spring now remembers the last time it was solved at (its bits) and the answer, and gives that answer again, bit for bit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Instruction counts (cachegrind, exact) against
|
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.
A tween's tracks share its ease (one
Rc<Spring>) and its timing, so every track of a tween asks its spring for the same time each frame. Aui.eachreorder withanimatemoves a thousand rows in one tween, two tracks a row: two thousand solves a frame (each anexpand asincos) for one number.Springnow keeps the last time it was solved at (its bits) and the answer; the same bits get the same answer back. The settling-time search still callssolvedirectly.Exact by construction: new test
a_spring_answers_a_time_asked_again_as_solvedchecks the kept answer against a fresh solve bit for bit, for repeated, interleaved, signed-zero and NaN times. zgx-script: 538 tests pass; clippy and fmt clean.Gate-style cachegrind, all scenes (origin/main vs this):
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.