Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Multiplication of matrix in C and OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-09 (12:30)
From: ls-ocaml-developer-2006@m...
Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml

Jon Harrop <> writes:

> On Friday 09 February 2007 09:06, 
> wrote:
>>    t(n) = C + K*n
> If you're assuming that the time taken will be proportional to complexity then 

Not complexity: The number of matrices multiplied ...

> that is almost certainly quite inaccurate in this case due to cache effects.

Yes, that's too much simplification. I'm aware of that. Exactly for
that reason the exact shape of the resulting graph would be
interesting, because it reflects where the different caches run out of
capacity. Still -- with 15s tun time and random data I assume that the
processor L1/L2 caches don't count (I don't see, why multiplying 2
different matrices one after the other should profit from caching --
mind: I scale the number of multiplications, not the size of

BTW: With my short note I didn't want to suggest a complete
methodology of measurement, but only wanted to comment that perhaps
optimization does still take place (because the results are not used)
and just hint to better methods of measurements than just taking the
time of a single run at a constant problem size. You (or better the
guy with the original problem) might improve on that at will.

Regards -- Markus