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

Prevent LTO implosion #189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

widlarizer
Copy link

When clang is used with -flto, nbody and cubic would get absolutely optimized away. This was caused by pure (side-effect free) functions being run only once, even though they're called in a loop N times with the same parameters. For this reason, their parameters must have been changed to create N distinct sets of parameters. This PR adds small changes and reduces the cubic and nbody LTO scores by 2-4 factors of magnitude while bringing minor changes to non-LTO scores.

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