How to tune numerical D? (matrix multiplication is faster in g++ vs gdc)
J
private at private-dont-email-dont-spam.com
Mon Mar 4 00:02:45 PST 2013
On Monday, 4 March 2013 at 05:07:10 UTC, Manu wrote:
> Using dynamic arrays of dynamic arrays that way is pretty poor
> form regardless of the language.
>
> You should really use single dimensional array:
> int matrix[SIZE*SIZE];
> And index via:
> matrix[y*SIZE+x]
>
> (You can pretty this up in various ways, if this is too
> unsightly)
>
>
> On 4 March 2013 14:02, John Colvin
> <john.loughran.colvin at gmail.com> wrote:
>
>> int[][] m = new int[][](rows, cols);
>>
>
> Does D support proper square array's this way? Or does it just
> automate
> allocation of the inner arrays?
> Does it allocate all the associated memory in one block?
That's a really good point. I wonder if there is a canonical
matrix that would be preferred?
More information about the Digitalmars-d
mailing list