[Shootout-list] Proposal: revised matrix multiplication test

Einar Karttunen ekarttun@cs.helsinki.fi
Thu, 4 Nov 2004 00:41:38 +0200


On 03.11 21:41, Aaron Denney wrote:
> N is given on the command line, and the matrix is given on standard
> input, in the form dimension D on the first line, and then D lines
> each having D numbers being the elements of the matrix in row-major
> order.

Please make the matrix constant, but require the programs to 
work with any other matrix too.

> To avoid differences in handling overflow between implementations, I
> would suggest using a signed permutation matrix[1] to test, though the code
> must, of course, work on any square matrix.
> 
> Rationale:
> The current tests relies on doing the same work multiple times, in order
> to get the times high enough to get reliable measurements.  Rather
> than this, I would prefer that all the work actually be necessary.

agreed.

> [1] each row and column is zero, except for one entry which may be
>     either plus or minus one.  There are D!*2^D different ones.

We need to make a dense matrix representation explicit then,
otherwise people will use sparse solutions.

- Einar Karttunen