[LLVMdev] FYI: Phoronix GCC vs. LLVM-GCC benchmarks

Chris Lattner clattner at apple.com
Wed Sep 16 10:11:05 PDT 2009


On Sep 16, 2009, at 10:05 AM, Stefano Delli Ponti wrote:

> Chris Lattner:
>> Comparing -O3 (and even -O4) is interesting, but we want all   
>> optimization levels to perform better than GCC :).  Lots of people  
>> use  -O2 and -Os, so comparing against other compiler's -O2 and -Os  
>> levels  is just as interesting as comparing -O3 vs -O3.
>
> My thinking was that, for instance, -02 for GCC and -02 for LLVM(- 
> GCC) do not necessarily mean the same thing, they may be not / 
> commensurable/.
> But perhaps, my ignorance, you are saying that they _are_, that LLVM  
> assigns the same types of optimizations as GCC to the different  
> levels.

Right, we want them to be roughly comparable.

O0 -> best debug experience, fastest compile times.
O2 -> optimize without bloating the code too much and without burning  
*too* many cycles.
O3 -> take more time and produce fatter code to get faster code.

O1 is something of a wasteland with no clear purpose :)

-Chris



More information about the llvm-dev mailing list