[cfe-users] Clang 3.9 running 50% slower than 3.7

jpsota@gmail.com via cfe-users cfe-users at lists.llvm.org
Wed Mar 16 07:25:00 PDT 2016

Hi, I recently installed "Release" clang (svn r263305) from source on my
OSX machine, and it's compiling a 20 file C++ program about 50% slower than
the natively installed clang 3.7 (that came with xcode, I believe, although
I don't use xcode). I currently have both sets of tools installed and am
able to switch back and forth and verify using time that clang 3.7 takes
about 30 seconds and clang 3.9 takes about 45 seconds, on average (all
flags, settings, etc. are the same for both). I did build with "Release" as
the build type, although I also did set DLLVM_ENABLE_ASSERTIONS=ON (could
this be the problem?). More details below. Please let me know if you have
any ideas about why this newer clang would be noticable slower.

Generally, I'm just trying to use clang as a user, not a clang developer,
so if you have general recommendations for how to configure this, please
let me know.

Thank you,

How I configured and installed:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake -DCMAKE_INSTALL_PREFIX=$CLANG_PREFIX -P cmake_install.cmake

Here are some specifics:

$ uname -a
Darwin localhost 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32
PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64

$ clang --version
clang version 3.9.0 (trunk 263305)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
InstalledDir: /Users/jim/toolchains/llvm/bin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20160316/2134cff3/attachment.html>

More information about the cfe-users mailing list