Skip to content

Conversation

SuperSamus
Copy link
Contributor

While the performance improvement is very small, the commit is simple as well (and IMO, separating part of dcbx into a separate function makes it less daunting to read).
Tested only on x86.

Separates the `dcbx` loop optimization to a function, in order to reuse it for `dcbt`. This way, `dcbt` loops will do absolutely nothing more efficiently.
@JosJuice
Copy link
Member

JosJuice commented Sep 7, 2025

Code review LGTM, but JitArm64 should also be tested before this can be merged. Do you know if this type of loop is used by only certain games, or most games in general?

@SuperSamus
Copy link
Contributor Author

SuperSamus commented Sep 7, 2025

Like for #13929, it is used by the SDK function _LCEnable.
Apparently the fact that Skylanders spams this function is a mistake, but that's what it does, so...

I tested about 20 other games, I only found Pro Evolution Soccer 2008 to also spam this function to a significant degree (and with significant, I mean that the entire function spends 0.65% of JIT time on the current master).

I also found Dragon Ball Z: Budokai Tenkaichi 3, but it calls the function only once per frame, so it barely matters.

In conclusion, the number of games that get some tangible improvement with this (and #13929) is likely very small.

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

Successfully merging this pull request may close these issues.

2 participants