From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 3BAD4820A1 for ; Wed, 11 Sep 2013 15:46:24 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of wojciech.meyer@gmail.com) identity=pra; client-ip=209.85.219.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@gmail.com"; x-sender="wojciech.meyer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of wojciech.meyer@gmail.com designates 209.85.219.41 as permitted sender) identity=mailfrom; client-ip=209.85.219.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@gmail.com"; x-sender="wojciech.meyer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-oa0-f41.google.com) identity=helo; client-ip=209.85.219.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="wojciech.meyer@gmail.com"; x-sender="postmaster@mail-oa0-f41.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmECAORzMFLRVdspm2dsb2JhbABbgz9SsBSKD4g9gRQIFg4BAQEBAQYLCwkUKIIlAQEEAUABGxACCAMBAwELBgULDQ0hIgERAQUBChIGExKHXQEDCQYMpjWMUYMHhCUKGScDCmSIJgEFDI4PgUsEB4QdA5d5gS+OWhgpgmOBaDs X-IPAS-Result: AmECAORzMFLRVdspm2dsb2JhbABbgz9SsBSKD4g9gRQIFg4BAQEBAQYLCwkUKIIlAQEEAUABGxACCAMBAwELBgULDQ0hIgERAQUBChIGExKHXQEDCQYMpjWMUYMHhCUKGScDCmSIJgEFDI4PgUsEB4QdA5d5gS+OWhgpgmOBaDs X-IronPort-AV: E=Sophos;i="4.90,884,1371074400"; d="scan'208";a="32442218" Received: from mail-oa0-f41.google.com ([209.85.219.41]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Sep 2013 15:46:15 +0200 Received: by mail-oa0-f41.google.com with SMTP id j6so9370478oag.14 for ; Wed, 11 Sep 2013 06:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=P7xFWmsJ8LxL6VSds8yJaV5CIjpVW1WDRerHf8ZBxNg=; b=ioC/OJmbcgoJ4VIdqw5E2YYB8AlgwVbnvgUdYPROTU01QqjoIkRso+gYSF7tR9iyfp spUrWYK+z5baxwR0UjmgGYcAtucJrdKhQQuWHncE+1Hyvotb1x3yzKxdFiutxYbsEvI0 W6v9kqZeuqxlGw3MttTHhreVzyg9X3d45oq1hbHRO64UfDRogjrr4ng9fa3zTtkzP5KM 00uehoJ3h2q3Lyb6QvC2AmyiMgh22uCM0dYL6x9US4hkU0AYn9TqyAFh5rDc62FPnFsO MsjO2InwPRGhFmVcFdPPhJeF2Y3eFSFCQ/bVlt+zUG36QbG/gC69VISsoWQzZfhGlPvm iZhg== MIME-Version: 1.0 X-Received: by 10.60.144.230 with SMTP id sp6mr409750oeb.102.1378907175002; Wed, 11 Sep 2013 06:46:15 -0700 (PDT) Received: by 10.182.120.102 with HTTP; Wed, 11 Sep 2013 06:46:14 -0700 (PDT) In-Reply-To: <5230695E.20100@riken.jp> References: <5229DEF9.7040706@inria.fr> <5229F284.5050806@inria.fr> <5230695E.20100@riken.jp> Date: Wed, 11 Sep 2013 14:46:14 +0100 Message-ID: From: Wojciech Meyer To: Francois Berenger Cc: Caml List Content-Type: multipart/alternative; boundary=047d7b5d5c1458292d04e61bd8b1 Subject: Re: [Caml-list] Accelerating compilation --047d7b5d5c1458292d04e61bd8b1 Content-Type: text/plain; charset=ISO-8859-1 What are you trying to prove here? Makefiles will be always faster as mentioned before, however there is still space for vast improvement, the biggest elephant here being slow scanning. Patches welcome. Also, it does not show the convenience of using ocamlbuild, in particular dynamic dependency resolver, nice language for specyfing complex rules, tags, and VPATH build that just works (does your makefile VPATH at all?) On Wed, Sep 11, 2013 at 2:00 PM, Francois Berenger wrote: > On 9/7/13 5:51 AM, Fabrice Le Fessant wrote: > >> On Fri, Sep 6, 2013 at 5:20 PM, Romain Bardou >> wrote: >> >>> 3) Parallel compilation in Ocamlbuild >>>>> >>>>> Of course it would help but it is not easy to implement so I'm just >>>>> putting it there to be exhaustive. >>>>> >>>> >>>> I'm not sure what you are referring to, OCamlBuild does already >>>> support parallel builds. >>>> >>> >>> Does it? I actually thought the -j option was ignored. >>> >>> I just did a quick test and I gain about 5 seconds with -j on a 1min15 >>> build (I had cleaned, recompiled and recleaned before so that caching by >>> the file system would not impact the result too much), so it does seem >>> to be a *little* faster :) >>> >> >> FWIW, I recently compiled Merlin with both ocamlbuild and ocp-build, >> on a quad-core with "-j 10" for both (the link to the ocp-build >> description file is in the latest OCamlPro's report), ocamlbuild needs >> 13s where ocp-build only needs 4s to compile everything. >> > > This morning, I played with a Makefile and ocamlbuild > to build batteries-included from a clean source tree. > > The Makefile was provided by Cedric Cellier. > > Here follows the wallclock times to build on my eight cores machine. > > #You can plot them like this: > cat < make_Vs_ocamlbuild.data > #nprocs Makefile ocamlbuild > 1 14.52 21.43 > 2 6.84 17.57 > 3 4.95 16.44 > 4 4.18 15.95 > 5 3.70 15.67 > 6 3.36 15.62 > 7 3.12 15.54 > 8 3.03 15.292 > EOF > gnuplot -persist < set title 'make Vs ocamlbuild' > set xlabel 'nprocs' > set ylabel 'wallclock time(s)' > plot 'make_Vs_ocamlbuild.data' u 1:2 w lines title 'time -p make fast -j > np', \ > '' u 1:3 w lines title 'ocamlbuild -j np' > EOF > > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/**arc/caml-list > Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-**bugs > --047d7b5d5c1458292d04e61bd8b1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
What are you trying to prove here? Makefiles will be = always faster as mentioned before, however there is still space for vast im= provement, the biggest elephant here being slow scanning. Patches welcome.<= /div>

Also, it does not show the convenience of using ocamlbuild, = in particular dynamic dependency resolver, nice language for specyfing comp= lex rules, tags, and VPATH build that just works (does your makefile VPATH = at all?)



On Wed, Sep 11, 2013 at 2:00 PM, Francois Berenger <= ;berenger@riken.jp> wrote:
On 9/7/13 5:51 AM, Fabrice= Le Fessant wrote:
On Fri, Sep 6, 2013 at 5:20 PM, Romain Bardou <romain.bardou@inria.fr> wrote:
3) Parallel compilation in Ocamlbuild

Of course it would help but it is not easy to implement so I'm just
putting it there to be exhaustive.

I'm not sure what you are referring to, OCamlBuild does already
support parallel builds.

Does it? I actually thought the -j option was ignored.

I just did a quick test and I gain about 5 seconds with -j on a 1min15
build (I had cleaned, recompiled and recleaned before so that caching by
the file system would not impact the result too much), so it does seem
to be a *little* faster :)

FWIW, I recently compiled Merlin with both ocamlbuild and ocp-build,
on a quad-core with "-j 10" for both (the link to the ocp-build description file is in the latest OCamlPro's report), ocamlbuild needs<= br> 13s where ocp-build only needs 4s to compile everything.

This morning, I played with a Makefile and ocamlbuild
to build batteries-included from a clean source tree.

The Makefile was provided by Cedric Cellier.

Here follows the wallclock times to build on my eight cores machine.

#You can plot them like this:
cat <<EOF > make_Vs_ocamlbuild.data
#nprocs Makefile ocamlbuild
1 14.52 21.43
2 6.84 17.57
3 4.95 16.44
4 4.18 15.95
5 3.70 15.67
6 3.36 15.62
7 3.12 15.54
8 3.03 15.292
EOF
gnuplot -persist <<EOF
set title 'make Vs ocamlbuild'
set xlabel 'nprocs'
set ylabel 'wallclock time(s)'
plot 'make_Vs_ocamlbuild.data' u 1:2 w lines title 'time -p mak= e fast -j np', \
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 '' u 1:3 w = lines title 'ocamlbuild -j np'
EOF

--047d7b5d5c1458292d04e61bd8b1--