From: Dario Teixeira <darioteixeira@yahoo.com>
To: Alain Frisch <alain.frisch@lexifi.com>, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Reducing boxing for floats
Date: Thu, 29 Mar 2012 11:11:15 -0700 (PDT) [thread overview]
Message-ID: <1333044675.73484.YahooMailNeo@web111513.mail.gq1.yahoo.com> (raw)
In-Reply-To: <4F734A6E.8010806@lexifi.com>
Hi,
> I'd like to ask for the community help in evaluating the benefits of a new
> strategy to control boxing/unboxing of floats in ocamlopt.
Thanks for this! I've given the 'more_unboxing' branch a brief try, using
the N-body problem from the infamous shootout as benchmark. Below are the
results for executables compiled with 3.12.1, today's SVN trunk, and today's
'more_unboxing' branch. The compiler options are the same as used in the
shootout; the tests consisted of 10^9 iterations on an x86_64 machine:
Version 3.12.1:
time ./nbody.native 1_000_000_000
1111.23user 0.13system 18:32.61elapsed 99%CPU (0avgtext+0avgdata 3472maxresident)k
0inputs+0outputs (0major+273minor)pagefaults 0swaps
SVN trunk (2012/03/29):
time ./nbody.native 1_000_000_000
969.29user 0.62system 16:14.66elapsed 99%CPU (0avgtext+0avgdata 3488maxresident)k
0inputs+0outputs (0major+273minor)pagefaults 0swaps
SVN branches/more_unboxing (2012/03/29):
time ./nbody.native 1_000_000_000
960.72user 0.30system 16:03.51elapsed 99%CPU (0avgtext+0avgdata 3472maxresident)k
0inputs+0outputs (0major+272minor)pagefaults 0swaps
Though the improvement from trunk to more_unboxing is small (about 1%) and
may in fact disappear altogether if one were to run a serious statistical
analysis, the improvement from 3.12.1 to 4.00 is quite striking: about 13%!
What has changed in the compiler that would explain this?
Also, a note to those using GODI: it's fairly straightforward to have multiple
co-existing OCaml installations, making the test of trunk or experimental
branches less disrupting. You'll find at the end the steps I used to get the
'more_unboxing' branch running. (Note that I had to run each godi_make step
individually because of step 6, though I'm sure the GODI ninjas will find
ways to streamline this process even further.)
Best regards,
Dario Teixeira
============================================================================
1) Tell GODI the SVN location to checkout.
Edit $GODI/etc/godi.conf:
OCAML_SVN_CHECKOUT = yes
OCAML_SVN_PATH = /ocaml/branches/more_unboxing
2) cd $GODI/build/godi/godi-ocaml-src
3) godi_make clean
4) godi_make fetch
5) godi_make extract
6) GODI expects the source code directory to be called 'work/ocaml'.
So we must do some renaming before proceeding:
mv -T work/more_unboxing work/ocaml
7) godi_make patch
8) godi_make configure
9) godi_make build
10) godi_delete godi-ocaml-src-3.12.1godi1
11) godi_make install
12) godi_make package
13) Start godi_console and mark package godi-ocaml for rebuilding.
This will automatically force an overall rebuild.
14) Enjoy!
prev parent reply other threads:[~2012-03-29 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 17:29 Alain Frisch
2012-03-29 18:11 ` Dario Teixeira [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=1333044675.73484.YahooMailNeo@web111513.mail.gq1.yahoo.com \
--to=darioteixeira@yahoo.com \
--cc=alain.frisch@lexifi.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).