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

Mixed optimization flags #144

Open
RamonUnch opened this issue May 5, 2023 · 1 comment
Open

Mixed optimization flags #144

RamonUnch opened this issue May 5, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@RamonUnch
Copy link
Contributor

I was playing with the build parameters of djdoom and I realized that I would get a small ~1.5% performance boost (on a 486dx2 emulated by PCEM) by optimizing some files for size instead of speed those files are am_map.c m_menu.c. It might be interesting to see if the same can be applied to FastDoom, The important performance part is more about the game-play and all that is menu/automap, intermission screen etc. can be size-optimized, as any slowdown will not significantly impact user experience. The same can probably be true for initialization code that is called only once. This will help with overall performances. I am not yet familiar enough with the source to guess which files should be size optimized.

Maybe with OpenWatcom there would be no difference because the generated code tend to be small anyway.

@viti95 viti95 added the enhancement New feature or request label May 9, 2023
@maxxoccupancy
Copy link

-Os turns on all optimizations for -O2, except those that increase the size of the code. This often produces code that fits better on the L1 ICache and even places less contention on the L2 unified cache.

I've never understood why there weren't also size conscious versions of -O3 and -Ofast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants