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

GCC builds are ~30% faster than Clang/MSVC builds #4

Open
dwatteau opened this issue Nov 14, 2020 · 1 comment
Open

GCC builds are ~30% faster than Clang/MSVC builds #4

dwatteau opened this issue Nov 14, 2020 · 1 comment

Comments

@dwatteau
Copy link
Owner

dwatteau commented Nov 14, 2020

Observed on macOS Mojave x86-64 with Clang 11.0.0, and OpenBSD/macppc 6.8 with Clang 10.0.1.

scummtr is approximately 30% faster with GCC than with Clang, when importing a translation.

GCC 10.2.0 and GCC 4.2.1 at -O2 are both faster than Clang at -O2 or -O3, so I don't think that it's a recent GCC improvement, since GCC 4.2.1 is from 2007.

There's no need for this set of tools to be extremely performant, but a reproducible 30% difference seems strange.

Possible reasons:

  • Clang really is slower than GCC
  • GCC enables a useful optimisation that Clang doesn't enable (but Clang was tested with -O3, too)
  • we have some undefined behaviour somewhere, and GCC chooses to optimise this away, while Clang is more strict.
@dwatteau
Copy link
Owner Author

dwatteau commented Nov 16, 2020

And, on the same machine, it seems that a release MSVC build is even a bit slower than the Clang build.

Roughly, importing a translation in the floppy version of ATLANTIS takes:

  • 5.6 seconds with a GCC release build
  • 8.2 seconds with a Clang release build
  • 9.9 seconds with an MSVC release build

I'll try playing with a bit of profiling to see where it seems to be slower.

@dwatteau dwatteau changed the title Clang builds are ~30% slower than GCC builds GCC builds are ~30% faster than Clang/MSVC builds Nov 16, 2020
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

No branches or pull requests

1 participant