On Fri, Nov 14, 2008 at 7:59 AM, bearophile <[EMAIL PROTECTED]> wrote: > Moritz Warning: >> I have noticed the same problem with foreach. >> A for loop is often faster. :/ > > You generally notice a difference only in the most inner and critical loops, > so I think it's okay to use foreach() in 80-90% of the code of a program. > > >> I haven't tried ldc yet.. > > I haven't succeed in compiling code with ldc yet. But I have tried the last > LLVM with the C code of the nbody benchmark of the Shootout, and GCC (MinGW) > 4.2.1 produces code about twice faster on my Core2. That's even quite worse > than the D code compiled with DMD.
That's a bummer to hear that. But the good point of LLVM is that it's on an upward trend. With DMD only Walter has the ability to work on backend codegen improvements and we all know how much time he has available for such things. Eventually I believe LLVM will leave DMD in the dust and probably GCC too. --bb
