is D so slow?
janderson
askme at me.com
Sat Jun 14 13:35:52 PDT 2008
Charles Hixson wrote:
> 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.
Actually it should be:
for(int i = n; --i>=0; )
(missed the >=)
-Joel
More information about the Digitalmars-d-learn
mailing list