dmd-x64

bearophile bearophileHUGS at lycos.com
Wed Dec 23 09:02:53 PST 2009


Leandro Lucarella:

> bearophile, el 23 de diciembre a las 00:13 me escribiste:
> > Compared to GCC LLVM lacks vectorization (this can be important for
> > certain heavy numerical computing code), profile-guided optimization
> > (this is usually less important, it's uncommon that it gives more than
> > 5-25% performance improvement)
> 
> I don't know if that are accurate numbers, but 5-25% looks like a *lot* to
> me.

Vectorization can improve 2X or 3X+ the performance of certain code (typical example: matrix multiplication done right).

Performance differences start to matter in practice when they are 2X or more. In most situations users aren't able to appreciate a 20% performance improvement of an application. (But small improvements are important for the compiler devs because they are cumulative, so many small improvements may eventually lead some a significant difference).

Regarding the accuracy of those numbers, it's not easy to tell how much accurate they are, because they are quite sensitive to the details of the code.


> > but it has a link-time optimizations that gcc lacks (about as important
> > as profile-guided optimization or a little more).
> 
> And GCC have LTO too, see:
> http://gcc.gnu.org/wiki/LinkTimeOptimization

Oh, nice, I have not tried this yet. Is this going in Gcc 4.5?
LTO of LLVM is pretty good, I don't know if GCC implements it equally well (I fear that the answer is negative.


> I'm not arguing that GCC is way better than LLVM, just wanted to add some
> lacking information to this thread.

Thank you.


> I really think they are very close,
> sometimes one is better, sometimes the other is better), but LLVM is very
> young compared to GCC so it's very promising that they are so close to GCC
> in so little time (and using less memory and CPU time).

LLVM devs are also very nice people, they help me when I have a problem, and they even implement large changes I ask them, often in a short enough time. Helping them is fun. This means that probably the compiler will keep improving for some more time, because in open source projects the quality of the community is important.

Bye,
bearophile



More information about the Digitalmars-d mailing list