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 OAA24322; Wed, 7 Nov 2001 14:20:22 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA24556 for ; Wed, 7 Nov 2001 14:20:21 +0100 (MET) Received: from scan1.fhg.de (scan1.fhg.de [153.96.1.35]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id fA7DKK113938 for ; Wed, 7 Nov 2001 14:20:20 +0100 (MET) Received: from scan1.fhg.de (localhost [127.0.0.1]) by scan1.fhg.de (8.11.1/8.11.1) with ESMTP id fA7DKJ911981 for ; Wed, 7 Nov 2001 14:20:20 +0100 (MET) Received: from kso.ilt.fhg.de (eeltc2.llt.RWTH-Aachen.DE [137.226.44.2]) by scan1.fhg.de (8.11.1/8.11.1) with ESMTP id fA7DKJP11977 for ; Wed, 7 Nov 2001 14:20:19 +0100 (MET) Received: from ilt.fhg.de (ilt.ilt.fhg.de [153.96.180.2]) by kso.ilt.fhg.de (8.11.1/8.11.1) with ESMTP id fA7DMUD07035 for ; Wed, 7 Nov 2001 14:22:30 +0100 (MET) Received: from eent359 (localhost [127.0.0.1]) by ilt.fhg.de (8.11.1/8.11.1) with ESMTP id fA7DKmr27173 for ; Wed, 7 Nov 2001 14:20:48 +0100 (MET) From: "Rolf Wester" To: caml-list@inria.fr Date: Wed, 7 Nov 2001 14:20:16 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: [Caml-list] Array Optimizations Message-ID: <3BE94320.26654.1BF88274@localhost> In-reply-to: <20011105.221118.74322497.debian00@tiscalinet.be> X-mailer: Pegasus Mail for Win32 (v3.12cDE) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Hi all, > > The following paper (that I found by chance) > http://www.cs.cornell.edu/Courses/cs612/2001SP/projects/ocaml-arrays/OCaml.pdf > describes a set of optimizations that improves array access speed in > Caml _without_loosing_bound_checking_ (contrarily to the -unsafe > option). The performance gain on their examples looks good, in fact > they even beat gcc in some cases! In their words: > > The final performance of MMM surpasses even that of the > best-case baseline kernel --- the linearized 1D Array with > bounds checking disabled --- yet without sacrificing the > safety of bounds checking or requiring the programmer to > linearize accesses. > > and > > We conclude that OCaml could be a serious contender against > languages such as C and Fortran for use in numerically > intensive computation. > > Is there anything like that (to be) implemented into the OCaml > compilers? I believe many people besides myself will be interested to > have the power of Caml available with extremely good array access > times in loops. > > Keep up with the good work! > > Cheers, > ChriS > > > P.S. As outlined in the paper, the Bigarray library is really slow > (much slower than the standard Array). Given its (other) > capabilities, it is tempting to use it for numeric processing however. > Until this is solved, shouldn't there be a warning somewhere (in the > manual?). > I my experience with Array and Bigarray the difference isn't so significant as it is in the above mentioned paper. Nevertheless I would very much appreciate Array and Bigarray perfomance comparable to C/C++. In that case may be I could convince some of my colleagues to use OCaml for their numerical work. Another approach could be to write a module comparable to the Python Numpy package. In any case complex numbers in Bigarray would be fine. Rolf Wester P.S.: At the moment I write a wrapper for interfacing with a subset of FFTW. I use Bigarray float64 as a complex array with re(i) = v.{2*i} and im(i)=v.{2*i+1}. Does anybody have a better idea? ------------------------------------- Rolf Wester rolf.wester@ilt.fraunhofer.de ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr