Skip to content

Batched easing evaluation API, playlist tokenization, and Component animate refactor#249

Open
inigomonyota wants to merge 12 commits intocurrentfrom
codex/identify-batching-and-simd-opportunities
Open

Batched easing evaluation API, playlist tokenization, and Component animate refactor#249
inigomonyota wants to merge 12 commits intocurrentfrom
codex/identify-batching-and-simd-opportunities

Conversation

@inigomonyota
Copy link

Motivation

  • Reduce per-tween branches and per-frame string parsing to improve runtime locality and make the hot loop SIMD-ready by evaluating easing per-algorithm over contiguous arrays.
  • Eliminate repeated playlist stringstream splitting from the hot path by parsing playlist filters once at Tween construction.

Description

  • Add using EasingKernel = float (*)(float, float, float);, static EasingKernel Tween::getKernel(TweenAlgorithm), and a new batched entry static void Tween::evaluateBatch(...) which evaluates contiguous progress/start/change arrays for a single algorithm.
  • Parse playlistFilter into playlistFilterTokens inside the Tween constructor and expose bool matchesPlaylist(const std::string&) const plus lightweight accessors startValue()/endValue() used by the batching flow.
  • Refactor Component::animate() to a gather/bucket/evaluate/apply pipeline that: resolves start values during gather, builds a TweenEvaluation list, buckets evaluations by algorithm, assembles SoA arrays (progress, start, change) per bucket and calls Tween::evaluateBatch(...), then applies results in original order while preserving behavior for zero/negative durations and startDefined semantics.
  • Add docs/animation-batching-simd-plan.md describing the motivation, design, and next steps for SIMD-friendly batching and data-layout changes.

Testing

  • Ran git -C /workspace/RetroFE diff --check to validate whitespace/merge issues and it completed with no reported problems.
  • Ran git -C /workspace/RetroFE status --short to confirm staged modifications and it reported the modified files.
  • Inspected modified code regions with nl (slices of Tween.h, Tween.cpp, and Component.cpp) to verify the new APIs, constructor tokenization, evaluateBatch implementation, and gather/bucket/evaluate/apply pipeline; those inspections matched the intended changes.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant