RFE: configuration for compiling HotSpot with Clang
mark at klomp.org
Fri Feb 11 12:55:40 PST 2011
On Fri, 2011-02-11 at 19:24 +0100, Volker Simonis wrote:
> at the FOSEDM I've heard Chris Lattner's very nice "LLVM and Clang"
> keynote. The claims he made in his talk have been very impressing: he
> was speaking about Clang being a "production quality" "drop-in
> replacement" for GCC with superior code generation and improved
> compile speed. Already during the talk I decided that I would be
> interesting to prove his pretensions on the HotSpot VM. If you're
> interested in the details you can read my blog:
> For the impatient the summary is that Clang is still slower than
> current GCC versions and the generated code seems to be slightly
> slower as well.
Nice. Good that someone double checks such claims.
Sad that the results are somewhat over-hyped.
If you like doing more benchmarks then you really should try with a
newer gcc release. GCC 4.5 is the latest, which is both faster at
compiling (about 10%) and produces faster code (up to 4%) compared with
earlier GCC releases. See
GCC also has Link Time Optimization (LTO) and Feedback Driven or Profile
Guided Optimization (FDO/PGO) which can (when combined) provide an
additional 10% speedup of code:
This can be somewhat trickier to setup though and is somewhat
experimental. But Mozilla has been experimenting with it for firefox and
got some impressive code size reductions (up to 11% smaller code, that
also executes faster). Compile and link times do increase though. See
More information about the hotspot-dev