caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Philippe Lelédy" <phl@leledy.org>
To: Caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Ocaml sums the harmonic series -- four ways, four benchmarks: floating point performance
Date: Sun, 16 Jan 2005 10:57:26 +0100	[thread overview]
Message-ID: <41EA3A86.2070408@leledy.org> (raw)

Xavier Leroy wrote:

>   done;
>    !sum +. 0.0;;
>
> The + 0.0 at the end is ugly but convinces ocamlopt that !sum is best
> kept unboxed during the loop.

Here are my times which show little difference w/ or w/o this hack

On 1.8 GHz PowerPC G5 (MacOS X 10.3.7, Objective Caml version 3.08.0)

./sumH4 1000000000  17.65s user 0.16s system 91% cpu 19.461 total
./sumH5 1000000000  16.17s user 0.11s system 91% cpu 17.702 total

On Intel(R) Pentium(R) 4 CPU 3.00GHz (Debian GNU/Linux, Objective Caml version 3.08.2)

./sumH4 1000000000  15,57s user 0,00s system 99% cpu 15,646 total
./sumH5 1000000000  15,45s user 0,00s system 99% cpu 15,480 total

Ph. L.


             reply	other threads:[~2005-01-16  9:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-16  9:57 Philippe Lelédy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-13 15:53 Will M. Farr
2005-01-13 17:29 ` [Caml-list] " John Prevost
2005-01-13 19:01   ` Will M. Farr
2005-01-13 20:24     ` John Prevost
2005-01-13 20:50       ` Erik de Castro Lopo
2005-01-13 21:32         ` Erik de Castro Lopo
2005-01-15 11:55 ` Xavier Leroy
2005-01-15 15:49   ` Michal Moskal
2005-01-15 17:13   ` Yaron Minsky
2005-01-23  2:27 ` Oliver Bandel
2005-01-23  6:07   ` Will M. Farr
2005-01-23 15:18     ` Oliver Bandel

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=41EA3A86.2070408@leledy.org \
    --to=phl@leledy.org \
    --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).