[LLVMdev] speed and code size issues
evan.cheng at apple.com
Fri Jul 17 18:58:14 PDT 2009
On Jul 17, 2009, at 4:41 PM, Eli Friedman wrote:
> On Fri, Jul 17, 2009 at 4:14 PM, Jonathan Gray<jsg at goblin.cx> wrote:
>> This seems to go against notes such as
>> which claim clang is signifcantly faster than gcc.
> I think the URL you want is actually
> http://clang.llvm.org/performance.html. The difference isn't as
> dramatic when you consider code generation, at least for the moment.
On Mac OS X / x86, llvm-gcc is easily > 20% faster than gcc 4.2 at -
O2 / -O3.
>> Below are some times and the larger object files when
>> compiling an i386 OpenBSD kernel at -O2 on an Intel Atom
>> based laptop. The significantly larger code size
>> is rather disturbing as it means binaries can't fit on
>> space constrained installation media for example.
> Are you building with -g? The debug info implementation is known to
> be relatively inefficient.
That shouldn't matter much unless it's -O0.
llvm generated code size is very close to gcc 4.2 (slightly worse on
x86, slightly better on x86_64). Given the code size difference, I am
inclined to believe something isn't being setup right. Jonathan,
please file a bug and attach the complete build logs. Also, please
some preprocessed files (e.g. bwi.i). Perhaps some .o files will help
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev