caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: Tom _ <tom7ca@yahoo.com>, caml-list@inria.fr
Subject: Re: [Caml-list] floating point performance
Date: Wed, 30 May 2001 12:06:46 -0700	[thread overview]
Message-ID: <4.3.2.7.2.20010530120230.02804a80@shell16.ba.best.com> (raw)
In-Reply-To: <20010530082931.69180.qmail@web11902.mail.yahoo.com>


A topic that is dear to my heart.  I haven't done any nontrivial profiling on my application yet, though, so my advice is currently limited.

>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?

One thing I noticed is that if the types are at all generalized, the Bigarray.{} accesses aren't inlined.  So, my code looks like this:

type ba2d = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t
type ba1d = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t

let mult (a : ba2d) (x : ba1d) =  etc.

If the code's not too big, and you've got the identical C version, I'd like to see it.

Chris

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


      reply	other threads:[~2001-05-30 19:04 UTC|newest]

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

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=4.3.2.7.2.20010530120230.02804a80@shell16.ba.best.com \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=tom7ca@yahoo.com \
    /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).