From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=AWL,NO_REAL_NAME autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 389C6BC6A for ; Fri, 9 Feb 2007 13:30:30 +0100 (CET) Received: from server2.thinkcrime.de (server2.thinkcrime.de [213.133.110.149]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l19CUTP9002648 for ; Fri, 9 Feb 2007 13:30:30 +0100 Received: from hod-sarge-2005-10.lan.m-e-leypold.de (dslb-088-072-219-206.pools.arcor-ip.net [88.72.219.206]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server2.thinkcrime.de (Postfix) with ESMTP id F3E95488032 for ; Fri, 9 Feb 2007 13:30:30 +0100 (CET) Received: by hod-sarge-2005-10.lan.m-e-leypold.de (Postfix, from userid 1003) id AB9D9376C1; Fri, 9 Feb 2007 13:35:39 +0100 (CET) To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml References: <45CAF3E2.7020807@univ-paris12.fr> <20070209.115842.106265091.garrigue@math.nagoya-u.ac.jp> <200702091205.57852.jon@ffconsultancy.com> Organization: Leypold, Software-Dienstleistungen und -Beratung From: ls-ocaml-developer-2006@m-e-leypold.de Date: Fri, 09 Feb 2007 13:35:39 +0100 In-Reply-To: <200702091205.57852.jon@ffconsultancy.com> (Jon Harrop's message of "Fri, 9 Feb 2007 12:05:57 +0000") Message-ID: User-Agent: Some cool user agent (SCUG) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at concorde with ID 45CC6965.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 matrices:01 multiplying:01 matrices:01 caching:01 markus:01 wrote:01 graph:01 caml-list:01 writes:01 short:01 measurements:01 data:02 btw:02 optimization:03 Jon Harrop writes: > On Friday 09 February 2007 09:06, ls-ocaml-developer-2006@m-e-leypold.de > 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 matrices). 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