caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tom _ <tom7ca@yahoo.com>
To: caml-list@inria.fr
Subject: [Caml-list] floating point performance
Date: Wed, 30 May 2001 01:29:31 -0700 (PDT)	[thread overview]
Message-ID: <20010530082931.69180.qmail@web11902.mail.yahoo.com> (raw)

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


             reply	other threads:[~2001-05-30  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-30  8:29 Tom _ [this message]
2001-05-30 19:06 ` Chris Hecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010530082931.69180.qmail@web11902.mail.yahoo.com \
    --to=tom7ca@yahoo.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).