From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Bootstrap optimization Date: Thu, 25 Oct 2018 14:25:29 +0200 Message-ID: Reply-To: mikael@djurfeldt.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000b9302805790cb32f" X-Trace: blaine.gmane.org 1540470248 8442 195.159.176.226 (25 Oct 2018 12:24:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2018 12:24:08 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Oct 25 14:24:04 2018 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFegG-00023Q-6d for guile-devel@m.gmane.org; Thu, 25 Oct 2018 14:24:04 +0200 Original-Received: from localhost ([::1]:54284 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFeiM-0002hh-JJ for guile-devel@m.gmane.org; Thu, 25 Oct 2018 08:26:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFehz-0002fQ-LF for guile-devel@gnu.org; Thu, 25 Oct 2018 08:25:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFehv-0005or-2b for guile-devel@gnu.org; Thu, 25 Oct 2018 08:25:51 -0400 Original-Received: from mail-oi1-f177.google.com ([209.85.167.177]:44132) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFehu-0005o6-OI for guile-devel@gnu.org; Thu, 25 Oct 2018 08:25:46 -0400 Original-Received: by mail-oi1-f177.google.com with SMTP id k19-v6so426653oic.11 for ; Thu, 25 Oct 2018 05:25:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to:cc; bh=3YX+ublW9eemK7bOdgGZvEaN/qZ2h1fbwxOFJJPcmCM=; b=UHL1+prH49czZtzZy6mRePgF40OYTiedpR0VOmcE+FfVrcLwGq0C5OGB+9gM/HaU5m EYjIST0J4maonGERwhuXZBxeC4haUW/j/f19pzfNwQg6BYLlu2kktqt3xgt/A/SmEJJq xr9SjNLPWCXO5j14f0d2RiIXl9xRd3VKK0f+2gFcZJGlGjDb13PvWnnkHmbxh+YHdOJJ pMhoDFmGtAzTTEX5f/ImRoVGmpQC0Ox9ti02ex2Wj2M3hTiGDXHzyeRIq4ujo/G9Sovv SbspZSzzLS0lfKgopO6yoyavVfh+BhAo/oVWFkI6ZBpSVh2RKMLhvJPbbAVWcxNpHmBb ljJg== X-Gm-Message-State: AGRZ1gKOw/nGNzweGFwMO2t5TZTSzSPiZ5eyVLsANk6UPZNXHdXFSLMp GWGONzPROiKkLt2+A1ecV7TcCleqKlhZWpDggQRIZg== X-Google-Smtp-Source: AJdET5cavGtlzdHFfTSPEWmpGMAGoIuOCSnAzuyWXVPHWhaOBVo8HkFIRoAHnWMrdpVvOvozpkgNHt2gtaoF1ANalis= X-Received: by 2002:aca:add2:: with SMTP id w201-v6mr335381oie.2.1540470345368; Thu, 25 Oct 2018 05:25:45 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.167.177 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19690 Archived-At: --000000000000b9302805790cb32f Content-Type: multipart/alternative; boundary="000000000000b9302405790cb32d" --000000000000b9302405790cb32d Content-Type: text/plain; charset="UTF-8" I find that the attached patch saves a few minutes for parallel builds on a four core machine. What it does is to build both eval.go and psyntax.pp.go serially before the rest is built in parallel (when make is given -j). Here's an attempt at explanation why this saves time: Let's denote the .go objects by numbers 1, 2, ... where 1 is eval.go and 2 is psyntax.pp.go. We also prepend a prefix "S" for a slow build with interpreted psyntax.pp and "F" for a fast build. Assuming a four core machine, we previously had something like: S1 S2 S3 S4 S5 S6 S7 S8 (since S2 builds so slowly) F9 F10 ... Now, instead, we have: S1 S2 F3 F4 F5 F6 ... On my machine, the patch saved 10 minutes out of 55 minutes without the patch. To which branch should this be applied, stable-2.2 or master? Best regards, Mikael --000000000000b9302405790cb32d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I find that the attached patch saves a few minutes fo= r parallel builds on a four core machine. What it does is to build both eva= l.go and psyntax.pp.go serially before the rest is built in parallel (when = make is given -j).

Here's an attempt at explan= ation why this saves time:

Let's denote the .g= o objects by numbers 1, 2, ... where 1 is eval.go and 2 is psyntax.pp.go. W= e also prepend a prefix "S" for a slow build with interpreted psy= ntax.pp and "F" for a fast build.

As= suming a four core machine, we previously had something like:
S1
S2 S3 S4 S5
=C2=A0=C2=A0=C2=A0=C2=A0 S6 = S7 S8 (since S2 builds so slowly)
F9 F10 ...

=
Now, instead, we have:

S1
S2
<= div>F3 F4 F5 F6
...

On my machine, the p= atch saved 10 minutes out of 55 minutes without the patch.

To which branch should this be applied, stable-2.2 or master?
<= /div>

Best regards,
Mikael

--000000000000b9302405790cb32d-- --000000000000b9302805790cb32f Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Bootstrap-optimization.patch" Content-Disposition: attachment; filename="0001-Bootstrap-optimization.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jnok9a8v0 RnJvbSAwZmU1Mj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