On Thu, 13 Nov 2008 06:19:27 -0500, bearophile wrote: > In this post I show few things I have found/collected in the last weeks > related to the performance of the code compiled with DMD. > [..] > > The D1 docs strongly suggest to use foreach every time it's possible, > avoiding to use the less handy for(), so for almost a year I have > assumed foreach is as fast as the for() but this two versions shows > differences: >
I have noticed the same problem with foreach. A for loop is often faster. :/ I haven't tried ldc yet..