[cfe-dev] speed of clang++

Chris Lattner clattner at apple.com
Sun Jan 24 20:17:34 CST 2010


On Jan 24, 2010, at 3:34 PM, Ivan Sorokin wrote:

> 
> Clang is 46 times faster. Why clang is so fast, or why g++ is so slow?

G++ keeps template instantiations on a linked list which it has to search linearly, clang uses a hash table.

-Chris

> 
> Maybe I have bad g++? Or clang++ has incomplete template support, that 
> is why it is so fast?
> 
> g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1
> clang revision 93461




More information about the cfe-dev mailing list