[m-rev.] for review: Parallelise make_java_csharp_arena_{base, diff}

Peter Wang novalazy at gmail.com
Thu Jul 26 14:54:37 AEST 2018


On Thu, 26 Jul 2018 06:37:43 +0200 (CEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> 
> On Thu, 26 Jul 2018 10:40:33 +1000, Peter Wang <novalazy at gmail.com> wrote:
> > +# The environment variable PARALLEL controls the maximum number of compiler
> > +# processes to run at a time.
> 
> I would have made the env var name something more specific to this script,
> such as JC_PARALLEL, to reduce the chances of collision with other software.
>   
> > +PARALLEL=${PARALLEL:-`nproc 2>/dev/null`}
> 
> On my laptop, nproc prints 8, even though it has only 4 cores,
> because the cores have hyperthreading. It would be nice
> if there were a way of disregarding hyperthreading,
> but nproc does not seem to have to do that.
> 
> Given that users can set the value themselves, this is not a real problem.

IME making use of hyperthreads is worthwhile. On my 4 core, 8 thread
machine, make_java_csharp_arena_base runs in:

PARALLEL=4  374.85s user 47.78s system 393% cpu 1:47.28 total
PARALLEL=6  500.85s user 58.29s system 587% cpu 1:35.09 total
PARALLEL=8  604.53s user 66.68s system 758% cpu 1:28.47 total

> 
> Both of the above concerns are about "would be nice to have"s.
> The diff is fine as it is.

I'll commit it, thanks.

Peter


More information about the reviews mailing list