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 KAA23003; Wed, 30 May 2001 10:29:34 +0200 (MET DST) 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 KAA23065 for ; Wed, 30 May 2001 10:29:33 +0200 (MET DST) Received: from web11902.mail.yahoo.com (web11902.mail.yahoo.com [216.136.172.186]) by nez-perce.inria.fr (8.11.1/8.10.0) with SMTP id f4U8TW119906 for ; Wed, 30 May 2001 10:29:32 +0200 (MET DST) Message-ID: <20010530082931.69180.qmail@web11902.mail.yahoo.com> Received: from [24.221.171.193] by web11902.mail.yahoo.com; Wed, 30 May 2001 01:29:31 PDT Date: Wed, 30 May 2001 01:29:31 -0700 (PDT) From: Tom _ Subject: [Caml-list] floating point performance To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have ported some numerical code from SML to O'Caml. It seems to perform about about 1/5th the speed of equivalent C code if I use "float array". I did look at the FAQ and at the numerical OCAML web page at Inria, and found them helpful. Using -unsafe didn't make a big difference, and neither did eliminating the obvious sources of consing. I'm probably still consing in a number of places, but I can't get a good handle of what to do about it or which parts matter. Is there some way of getting a measure of the amount of consing that happens in a section of code? The web page says that the O'Caml compiler will box floating point numbers if I use recursive calls; is that still true for tail recursive calls to functions that are visible only locally? It would seem that that transformation should be pretty easy. Is there a chance that using the new native types would help? How do they interact with tail recursive calls? Also, using Bigarray costs a factor of 3 in speed compared to otherwise identical code. The profiler suggests that subscripting isn't getting inlined. Is there some way of getting faster performance out of Bigarray? Thanks in advance for any hints you can offer. If anybody is interested in taking a look, I can send them the code separately. Cheers, Thomas. __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr