Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPCCache: Make arrays constexpr where applicable #8506

Merged
merged 2 commits into from Dec 14, 2019

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented Dec 3, 2019

We make use of std::array within the PPC cache code. While we're in there, we can make the initialization of two arrays constexpr and move them out of the save state data, shrinking the size of save states a little bits.

data = {};
tags = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You used fill in InstructionCache::Reset, why not here too?

Allows simplifying a bunch of initialization and filling code.
Two of these arrays were stored within the save state when the exact
same data is constructed all the time.

We can just build this into the binary rather than the save state,
shrinking a little bit of the save state's overall size.
@leoetlino leoetlino merged commit 49fcc71 into dolphin-emu:master Dec 14, 2019
@lioncash lioncash deleted the cache branch December 14, 2019 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants