D 50% slower than C++. What I'm doing wrong?

Somedude lovelydear at mailmetrash.com
Sun Apr 15 14:41:15 PDT 2012


Le 15/04/2012 23:33, Ashish Myles a écrit :
> On Sun, Apr 15, 2012 at 5:16 PM, Somedude <lovelydear at mailmetrash.com> wrote:
>> Le 15/04/2012 09:23, ReneSac a écrit :
>>> On Sunday, 15 April 2012 at 02:56:21 UTC, Joseph Rushton Wakeling wrote:
>>>>> On Saturday, 14 April 2012 at 19:51:21 UTC, Joseph Rushton Wakeling
>>>>> wrote:
>>>>>> GDC has all the regular gcc optimization flags available IIRC. The
>>>>
>>>
>>>
>>
>> I notice the 2D array is declared
>> int ct[512][2]; // C++
>> int ct[2][512]; // D
>>
> 
> Not quite. It is declared
>     int[2][512] ct;  // not valid in C++
> which is the same as
>     Int ct[512][2],  // also valid in C++
> 
> That's because you look at it as ((int)[2])[512]  512-sized array of
> 2-sized array of ints.

 Oh right, sorry for this. It's a bit confusing.


More information about the Digitalmars-d-learn mailing list