On 9/7/13 5:51 AM, Fabrice Le Fessant wrote:This morning, I played with a Makefile and ocamlbuild
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
13s where ocp-build only needs 4s to compile everything.
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 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