From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA17368; Thu, 27 Mar 2003 20:34:32 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA19417 for ; Thu, 27 Mar 2003 20:34:30 +0100 (MET) Received: from marble.he.net (marble.he.net [216.218.230.2]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h2RJYT505455 for ; Thu, 27 Mar 2003 20:34:29 +0100 (MET) Received: from ucdavis.edu ([208.227.214.58] (may be forged)) by marble.he.net (8.8.6/8.8.2) with ESMTP id LAA04162 for ; Thu, 27 Mar 2003 11:34:23 -0800 Message-ID: <3E8353AF.2090602@ucdavis.edu> Date: Thu, 27 Mar 2003 11:40:31 -0800 From: Issac Trotts User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1 MIME-Version: 1.0 To: OCaml List Subject: Re: [Caml-list] DFT in OCaml vs. C References: <3E82A960.2070707@ucdavis.edu> <16002.55666.945143.140530@lachesis.inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; issac:01 trotts:01 ijtrotts:01 caml-list:01 fourier:01 redwood:99 printf:01 ocaml:01 0.250:98 tar:01 benchmark:02 ucdavis:02 transform:02 clearer:02 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Fabrice Le Fessant wrote: >> Here's a numerical mini-benchmark comparing C to OCaml >> on a simple implementation of the Discrete Fourier Transform: >> >> http://redwood.ucdavis.edu/~issac/dft_compare.tar.gz >> >> The results on my 1 GHZ Pentium III Linux box: >> >> > > > >> I'd be interested if anyone on this list knows of a way >> to make it perform as well as the C version (without using the FFT.) >> >> > >If you really want to benchmark the numerical code, then, write a >program where there is only numerical code. Given the size of the >matrices you use (8), one can wonder if the program spends more time >to compute the FFT or to test and print the results. > Okay, I should have made the code clearer. The bulk of the time is spent in the test2 function, which works on signals much longer than eight samples. After removing the printf calls and test1, the time doesn't improve much: real 1m47.500s user 1m37.820s sys 0m0.250s Thanks for the suggestions. Issac ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners