is D so slow?

Charles Hixson charleshixsn at earthlink.net
Sat Jun 14 13:06:57 PDT 2008


On Sat, 14 Jun 2008 11:34:20 -0700, janderson wrote:

>...To me your code looks reasonable, although you probably want to take 
the
> startup time and the gc out of the equation since that cost is fixed.
> BTW: here's a slightly more optimal reverse loop:
> 
> for(int i = n; --i>0; )
> 
> -Joel

wouldn't that be:
for(int i = n; i-- >0; )
?
first time through i == n-1, last time through i == 0.


More information about the Digitalmars-d-learn mailing list