caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: Ocaml for Scientific computing
Date: Tue, 25 Sep 2007 21:38:48 +0100	[thread overview]
Message-ID: <200709252138.49050.jon@ffconsultancy.com> (raw)
In-Reply-To: <1190745994.12747.41.camel@rosella.wigram>

On Tuesday 25 September 2007 19:46:34 skaller wrote:
> On Tue, 2007-09-25 at 13:27 -0400, Mike Lin wrote:
> > On Sep 25, 7:11 am, Alex Mikhalev <a.mikha...@cranfield.ac.uk> wrote:
> >
> > For numerical computing, I wish ocamlopt would do at least basic loop
> > optimizations, like hoisting invariant values -- this type of stuff is
> > easily done manually, but often at the expense of code readability.
>
> Gcc does this quite well I think. However in a higher level
> procedural language (like Ocaml and Felix) it is very hard
> to get right and potentially very expensive.

I'm not sure that it is conceptually more difficult to do similar things for 
OCaml but my vote goes to hoisting bounds checks. I don't like having to 
write unsafe code by hand in OCaml and F# does a great job of improving 
performance by hoisting bounds checks.

I discussed some of the benchmarks where F# is faster than OCaml recently on 
one of our blogs:

  http://ocamlnews.blogspot.com/2007/09/spectral-norm.html

For some reason, the current implementation of spectral-norm on the shootout 
leaves out some important optimizations in OCaml. F# doesn't require these 
optimizations to be done by hand.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e


  reply	other threads:[~2007-09-25 20:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 17:27 Mike Lin
2007-09-25 18:46 ` [Caml-list] " skaller
2007-09-25 20:38   ` Jon Harrop [this message]
2007-09-25 21:01     ` skaller
2007-09-26  8:27       ` Florian Hars
2007-09-26  8:53         ` skaller

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=200709252138.49050.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.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).