280 points · by sohkamyung · 8y ago · 80 comments
"At the moment, performance is a mixed bag. Some tests are up and some are down. In particular I believe Speedometer is down a few percent."
"Note however that clang-cl is punching above its weight. These builds currently have neither LTO nor PGO, while our MSVC builds use both of those. Any regressions that we're seeing ought to be short-lived. Once we enable LTO[1] and PGO[2], I expect clang to be a clear performance win."
[1] "LTO (Link Time Optimization) is a method for achieving better runtime performance through whole-program analysis and cross-module optimization." http://blog.llvm.org/2016/06/thinlto-scalable-and-incrementa...
[2] PGO = Profile Guided Optimization
1. https://bugs.chromium.org/p/chromium/issues/detail?id=580389...
Depends. Virtual calls can be done purely in code, with different implementation files you need to go round via the build system. The former just always works independent of platform whereas often for the latter it's more configuration work. Also, ignoring YAGNI, you could say the virtual one makes it easy to quickly test things out etc, is easily mockable, ...
I don't fully understand the proposal here. Do you have an example of a code in the wild that uses the proposed scheme?
Because that’s what we need, more magic in the build system.
Very cool. The potential to inline Rust and C++ (and C, of course) code together at the LLVM level is one of those things that's been theoretically possible for a long time now but has yet to really mature in practice (at least, I'm not aware of anyone aside from Mozilla attempting it at scale). Really curious to see how this affects Firefox performance once they get it all wired up.
I'm more interested in seeing whether the maintainability of Firefox will increase over time as the proportion of Rust code increases. That is, will Mozilla be able to accelerate Firefox's development because the source code is in a safer language?
https://support.mozilla.org/en-US/kb/firefox-uses-too-many-c...
If it is still happening after you try those, use https://perf-html.io/ and share a profile.
Also nightly contains all sorts of debug stuff
> We've discussed this on several occasions but apparently nobody ever filed a bug.
> There are a number of reasons using clang-cl for our official builds would be good:
> * The ability to patch the toolchain as we do on other platforms
> * The ability to diagnose and upstream fixes for compiler bugs we encounter
> * It would provide motivation to switch to clang on all platforms, which would make it so we only have to worry about a single compiler for things like performance optimization (I don't assume we would drop support for MSVC or gcc, we just wouldn't have to worry as much about compiler quirks)
Compiler Version Compiler flags
z:/build/build/src/clang/bin/clang-cl.exe -Xclang -std=gnu99 -fms-compatibility-version=19.13.26128 19.13.26128 -Qunused-arguments -nologo -wd4091 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -Gw -wd4244 -wd4267 -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-invalid-noreturn -we4553
z:/build/build/src/clang/bin/clang-cl.exe -fms-compatibility-version=19.13.26128 19.13.26128 -Qunused-arguments -Qunused-arguments -TP -nologo -w15038 -wd5026 -wd5027 -Zc:sizedDealloc- -wd4091 -wd4577 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -Gw -wd4251 -wd4244 -wd4267 -wd4800 -wd4595 -wd4065 -Wno-inline-new-delete -Wno-invalid-offsetof -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -we4553 -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Zi -O2 -Oy-Since the headline doesn't mention MSVC, this could be interpreted as relevant to the old GCC vs. Clang issue, but it really isn't in this case.
To use Google Groups Discussions, please enable JavaScript in your browser settings, and then refresh this page.
NoScript users will be automatically redirected to this version (which doesn't require it):
https://groups.google.com/forum/m/?_escaped_fragment_=topic/...
Sadly it probably doesn't make sense for them to allocate resources to that. On the other hand in my experience at least GCC dominates in performance department so that would help with not worrying about compiler switch causing performance regression.