[cfe-dev] Parsing benchmark: LibTomMath

Chris Lattner clattner at apple.com
Sat Nov 17 16:23:32 PST 2007


On Nov 17, 2007, at 4:11 PM, Steve Naroff wrote:

>
> On Nov 17, 2007, at 2:22 PM, Chris Lattner wrote:
>>
>> For user time, it is hard to guess what the difference is.  Is this
>> source code available to use for timings?  I'd be interested to see
>> where clang is spending all its time: your cfe is almost 2x faster,
>> which points to us doing something pretty braindead :)
>>
>
> Chris,
>
> I think it would be great to learn from cfe, but it needs to be in  
> harmony with our goals.
>
> Without knowing the architecture of Neil's cfe, it's really hard to  
> say we're doing anything braindead (though it's always great to find  
> "low hanging fruit"-:). For example, the "Tiny C Compiler" is  
> reported to compile/assemble/link 9x faster than GCC. While this is  
> great, it's clearly not an architecture that is interesting to us.  
> clang is the most highly "layered" front-end I've ever worked on  
> (clang is the 5th C-based front-end I've had the pleasure to work  
> on). While layering opens up a world of possibilities, it has a cost.

Don't worry Steve, I agree with you :).  In my travels, I've found  
that if you have the right architecture that proper layering doesn't  
impose a huge performance penalty.  I believe that we can be very  
performant and still have the nice architecture we desire.

Whether I'm right or wrong, the place to start is to find out where  
the time is going.  My guess is that the overhead doesn't have  
anything to do with the layering.  If it does, then we can either  
figure out a way to make the layering be less costly, or accept it as  
the cost we pay for a nice architecture.

-Chris



More information about the cfe-dev mailing list