caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Rolf Wester" <rolf.wester@ilt.fhg.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Array Optimizations
Date: Wed, 7 Nov 2001 14:20:16 +0200	[thread overview]
Message-ID: <3BE94320.26654.1BF88274@localhost> (raw)
In-Reply-To: <20011105.221118.74322497.debian00@tiscalinet.be>

> 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


  parent reply	other threads:[~2001-11-07 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-05 21:11 Christophe TROESTLER
2001-11-06 15:51 ` Thorsten Ohl
2001-11-07 12:20 ` Rolf Wester [this message]
2001-11-07 20:10   ` David McClain

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=3BE94320.26654.1BF88274@localhost \
    --to=rolf.wester@ilt.fhg.de \
    --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).