Skip to content

perf(vu): reduce FMAC flag packing and initialization work - #250

Open
GTTeancum wants to merge 1 commit into
ran-j:mainfrom
GTTeancum:codex/vu-fmac-flag-packing
Open

perf(vu): reduce FMAC flag packing and initialization work#250
GTTeancum wants to merge 1 commit into
ran-j:mainfrom
GTTeancum:codex/vu-fmac-flag-packing

Conversation

@GTTeancum

Copy link
Copy Markdown

Summary

  • Pack four lane flag nibbles into the MAC Z/S/U/O masks with two portable integer transpose stages.
  • Preserve destination masking and STATUS aggregation, including the existing handling of high input bits.
  • Initialize the new all-integer/bool flag entry directly instead of copying an aggregate temporary. Queue selection, latency, sticky flags and retirement are unchanged.

This is based directly on upstream main and does not depend on #245. It includes no game data, generated game code, or private captures.

Validation

  • Windows x64 Release full upstream-based suite: 426/426 passed.
  • Exhaustive packing test: 1,048,576 canonical flag/destination combinations and 4,096 high-bit cases against an independent per-bit reference.
  • In the X-Men bring-up tree, applying the same producer change to both interpreted and native paths passes 129/129 VU tests. Two recorded workloads remain exact in state, memory, GIF data/timing and cycles at normal and 1/8/16/64-cycle slicing.

Performance Context

A sampled native flag producer contained dozens of scalar bit operations plus a 40-byte stack-zero/copy sequence. The changed assembly removes that temporary.

Seven alternating comparisons in the separate bring-up tree measured:

  • Original workload: 2462.786 ms -> 2394.965 ms (2.754% lower; 7/7 wins).
  • Broader workload: 2098.631 ms -> 2012.671 ms (4.096% lower; 7/7 wins).

Those shared-host measurements include the equivalent native-path change, which is not part of this PR. They are not a performance claim for this upstream-only subset or for full-game FPS. The exhaustive public test and full-suite result are independently reproducible without game assets.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant