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! -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs