From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2TIBnFO004667 for ; Thu, 29 Mar 2012 20:11:49 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq8OAKqldE9ii1vCY2dsb2JhbAA4DadPkVwXCgocBCSCBAUBAQQBCyAVAQIVIgEDCwYFRi8BDgEGEgYBJodxBQSqAgqCZ4UpiTQBBgoBkRQEiFiNEIVpLU2IZINn X-IronPort-AV: E=Sophos;i="4.75,669,1330902000"; d="scan'208";a="138282929" Received: from nm8-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.194]) by mail4-smtp-sop.national.inria.fr with SMTP; 29 Mar 2012 20:11:18 +0200 Received: from [98.139.91.65] by nm8.bullet.mail.sp2.yahoo.com with NNFMP; 29 Mar 2012 18:11:17 -0000 Received: from [98.139.91.30] by tm5.bullet.mail.sp2.yahoo.com with NNFMP; 29 Mar 2012 18:11:17 -0000 Received: from [127.0.0.1] by omp1030.mail.sp2.yahoo.com with NNFMP; 29 Mar 2012 18:11:17 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 104947.63696.bm@omp1030.mail.sp2.yahoo.com Received: (qmail 81876 invoked by uid 60001); 29 Mar 2012 18:11:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1333044675; bh=8Fpa+B1hCQRpOqFgOWVu+VOo+i95QL3JonV/SWn0FCM=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BVzIZgpdupm/Z+kLTRMUcq2rXs8uv+iZ6NgkE0T6J6Xcwm9qwgzPBdmKatFwHlUs69JE8DrPbR6QrQ6l95qwoYZ7P3oKcYVP+MEgisvoMDw8GE2tYdAbVuVLFxmDu20rST/ML+MGZj70Yq3RzcgGpXq28nqg6IOLOcdcYRzabEg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4wHyMZg5vTAo7JDHNT/nV1sAYixNY2HG14VMjIHRpgtABtu92DrPqtae3I/XoLon13FWth08av7GRbL1jyNNEBZLy0rlumZxcI9hG2gQIRYtjLBUDt8xM5o97T6VHY40N3zces7JsZpvgNDyj3iUrla/1WH6D9VIzqt2hlqTbzI=; X-YMail-OSG: pB3PVV0VM1keVIFLgWQzm5qa7gLScQGySQdrEYMGPdANEkE Qj4H5MhqQDz5wRFcjsBeBj5SjhGSbtqey1X2HqbKGPu2Clb9OHCogBx1i9cL LHdv8Iph..ePYwoyQ5wRdL.F0QAg3u3kI7p7JRh9_mPdbc1v4t5HErKG5sWs GktZWw3804emhRZWMyEY54mOzlbHiYgofhEzARxGlDYeYyt_FZZSQzfow6WF 00ld3WwDmOU.BfmG10LqknjFUYadwaGnbHnXeFeNBkjVIhrJTmImpY8GF8yt QlBBjecJQMJeBput7k1ulcRWpAobhFJei4zErXo88_icoBCaE5j.Ed0IeVH9 OEVtO2NHpIqK9oalL85XUDF6ik2w0DVGlpEi5E6Eigk7fzvG1A5KZRj8_RMI geErxU5tLgn0NUPzBPMD6PzyR0kpw8mxgHD57zrw1z5oUFtgf3CqGHZ2jetv t38Xig3PJOg-- Received: from [195.23.80.173] by web111513.mail.gq1.yahoo.com via HTTP; Thu, 29 Mar 2012 11:11:15 PDT X-Mailer: YahooMailWebService/0.8.117.340979 References: <4F734A6E.8010806@lexifi.com> Message-ID: <1333044675.73484.YahooMailNeo@web111513.mail.gq1.yahoo.com> Date: Thu, 29 Mar 2012 11:11:15 -0700 (PDT) From: Dario Teixeira Reply-To: Dario Teixeira To: Alain Frisch , caml-list In-Reply-To: <4F734A6E.8010806@lexifi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q2TIBnFO004667 Subject: Re: [Caml-list] Reducing boxing for floats 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!