www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: dmd-x64

reply alkor <alkor au.ru> writes:
i've tested g++, gdc & dmd on an ordinary task - processing compressed data w
using zlib
all compilers're made from sources, target - gentoo x32 i686

c++ & d codes are simplest & alike

but, dmd makes faster result then g++
and gdc loses g++ 'cause gdc'es not have any optimization options

gdc makes slower code then dmd and does'nt support d 2.0, so it's useless

so ... i'm waiting for dmd x64

== Repost the article of Travis Boucher (boucher.travis gmail.com)
== Posted at 2009/12/23 01:51 to digitalmars.D

bearophile wrote:
 Travis Boucher:
 Although it's design
 promotes all sorta of optimization techniques, its still pretty young
 (compared to gcc) and just doesn't have all of the optimization stuff
 gcc has.

 I have already done hundred of tests and benchmarks with LDC and llvm-

 http://blog.llvm.org/2009/12/advanced-topics-in-redundant-load.html

 Compared to GCC LLVM lacks vectorization (this can be important for certain heavy numerical computing code), profile-

time optimizations that gcc lacks (about as important as profile- guided optimization or a little more).
 LLVM produces bad X86 floating point code still, but its int/

 GCC is older and it knows few extra small/

 So overall LLVM may sometime produce a little slower code, but in many situations it's about as good or even better (I can show a large amount of cases where LLVM is better). So the asm quality difference is smaller than you seem to imply. If the size of such performance differences are important for you, then you may want to use the Intel compiler instead of GCC, because it's sometimes better than GCC.

 Bye,
 bearophile

I am not trying to get into the benchmark game, for every example of gcc generating better code then llvm, there could be an example of llvm generating better code then gcc. What I was trying to state is the overall differences between the two:   - ldc supports newer versions of the dmd front end then gcc.   - gdc tend to generate better code then ldc (in many cases)   - gdc supports more targets (the code generator, not the runtime) I personally use an old-ass gdc because it works for what I need.  I'd like to switch to ldc, but there is limited support for my target platform.
Dec 23 2009
parent Travis Boucher <boucher.travis gmail.com> writes:
alkor wrote:
 i've tested g++, gdc & dmd on an ordinary task - processing compressed data w
using zlib
 all compilers're made from sources, target - gentoo x32 i686
 
 c++ & d codes are simplest & alike
 
 but, dmd makes faster result then g++
 and gdc loses g++ 'cause gdc'es not have any optimization options
 
 gdc makes slower code then dmd and does'nt support d 2.0, so it's useless
 
 so ... i'm waiting for dmd x64
 

If you can't get gdc to generate optimized code, then you are using it wrong.
Dec 23 2009