From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA27897 for caml-red; Thu, 7 Sep 2000 15:29:06 +0200 (MET DST) 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 LAA25956 for ; Thu, 7 Sep 2000 11:42:49 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e879glT21962; Thu, 7 Sep 2000 11:42:47 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA24129; Thu, 7 Sep 2000 11:42:46 +0200 (MET DST) Message-ID: <20000907114246.32643@pauillac.inria.fr> Date: Thu, 7 Sep 2000 11:42:46 +0200 From: Xavier Leroy To: John Max Skaller Cc: caml-list@inria.fr Subject: Re: ICFP'00 programming contest References: <20000831113726.36306@pauillac.inria.fr> <200008311919.MAA24268@fiji01.liquidmarket.com> <20000831215018.11218@pauillac.inria.fr> <39B5D472.C70EA12F@maxtal.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <39B5D472.C70EA12F@maxtal.com.au>; from John Max Skaller on Wed, Sep 06, 2000 at 04:21:54PM +1100 Sender: weis@pauillac.inria.fr > It would be interesting to see how good ocaml is now with FP. > I believe Fortran is king, with C being roughly 50% slower. I have few numerical benchmarks in Caml, and even fewer for which equivalent C code is available. Here are figures for two such benchmarks, Pseudoknot (an ADN conformation thing with lots of 3D geometry) and FFT (fast Fourier transform): C OCamlopt OCamlopt w. bounds checks wo. bounds checks PentiumIII 450Mhz FFT 0.43s 0.62s 0.55s Nucleic 0.12s 0.17s 0.17s Alpha 21264 500Mhz FFT 0.28s 0.27s 0.26s Nucleic 0.06s 0.07s 0.07s So, OCaml is doing quite well on code that uses records of floats and one-dimensional float arrays. I don't have good benchmarks for multidimensional arrays, but I'd expect the results to be not as good, since the default representation of multidimensional arrays as arrays of arrays can be expensive; however, the new "Bigarray" module provides flat multidimensional float arrays, with some support in ocamlopt to generate decent (if not really optimized) code. > I'm not a numerical programmer, but I have considerable 'sympathy' > for that art form, so I'd like to thank the ocaml team for the > hard work of tuning ocaml to make it suitable for numerical > programming use. I, too, have sympathy for numerical applications, and we have very interesting feedback from some members of this community. They seem quite open towards high-level languages with a mathematical flavor, probably more so than most IT professionals. In the same vein, you could have a look at the PSCICO project at CMU (http://www.cs.cmu.edu/~pscico/) - Xavier Leroy