English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] DFT in OCaml vs. C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-27 (19:34)
From: Issac Trotts <ijtrotts@u...>
Subject: Re: [Caml-list] DFT in OCaml vs. C
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 
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.


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