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.
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.