Skip to content

Conversation

@jcm93
Copy link
Contributor

@jcm93 jcm93 commented Oct 24, 2024

This is a change spun off from continuing build system work.

There, we've found that precompiling the ares/ares.hpp header can speed up compile times for the emulator cores by 30-35%. Doing so, however, leads to a few collisions:

  • Several files in parallel-rdp use the Hash type, which variously resolves to a Hash in its own namespace as well as nall's namespace.
  • Also in the N64 core, nall's noinline macro conflicts with similar definitions present in xxhash.

For parallel-rdp, we can simply skip precompiled headers for the conflicting files; parallel-rdp does not use anything in the ares/ares.hpp header, so including it there is unnecessary anyway.

This change resolves the second set of collisions by putting nall's noinline preprocessor macro into its own namespace.

There are many macros remaining that are not namespaced. I did not proceed in namespacing them for this PR, because there are a lot of them, and it would be a fairly significant code style change that probably merits further discussion (not to mention, it will be a decent amount of work). However, in this instance, there is (or will be) a material benefit that probably trumps the minor style issue.

@jcm93
Copy link
Contributor Author

jcm93 commented Oct 24, 2024

This was verified to build (and work) locally but running on CI is probably a good idea because of some of the macro weirdness in the N64 interpreter.

@LukeUsher LukeUsher merged commit 65c34c2 into ares-emulator:master Oct 26, 2024
10 checks passed
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