From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: guile 3 update, september edition Date: Mon, 17 Sep 2018 11:35:39 +0200 Message-ID: <87musg79g4.fsf@gnu.org> References: <87sh28msxt.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1537177034 6620 195.159.176.226 (17 Sep 2018 09:37:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2018 09:37:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Sep 17 11:37:10 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 1g1pxt-0001cf-JP for guile-devel@m.gmane.org; Mon, 17 Sep 2018 11:37:09 +0200 Original-Received: from localhost ([::1]:34657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1q00-0003BH-1M for guile-devel@m.gmane.org; Mon, 17 Sep 2018 05:39:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1pwX-0000gj-E0 for guile-devel@gnu.org; Mon, 17 Sep 2018 05:35:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1pwU-0008VG-7M for guile-devel@gnu.org; Mon, 17 Sep 2018 05:35:45 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1pwU-0008S2-0t; Mon, 17 Sep 2018 05:35:42 -0400 Original-Received: from [193.50.110.53] (port=45776 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g1pwT-0000MZ-Mt; Mon, 17 Sep 2018 05:35:41 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Jour de la Vertu de =?utf-8?Q?l'Ann=C3=A9e?= 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: <87sh28msxt.fsf@pobox.com> (Andy Wingo's message of "Mon, 17 Sep 2018 10:25:34 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:19665 Archived-At: Hello! Andy Wingo skribis: > This is an update on progress towards Guile 3. In our last update, we > saw the first bits of generated code: > > https://lists.gnu.org/archive/html/guile-devel/2018-08/msg00005.html > > Since then, the JIT is now feature-complete. It can JIT-compile *all* > code in Guile, including delimited continuations, dynamic-wind, all > that. It runs automatically, in response to a function being called a > lot. It can also tier up from within hot loops. Woohoo! It=E2=80=99s awesome that JIT can already handle all Guile code an= d run all the test suite. To me that means it can be merged into =E2=80=98master= =E2=80=99. > The threshold at which Guile will automatically JIT-compile is set from > the GUILE_JIT_THRESHOLD environment variable. By default it is 50000. > If you set it to -1, you disable the JIT. If you set it to 0, *all* > code will be JIT-compiled. The test suite passes at > GUILE_JIT_THRESHOLD=3D0, indicating that all features in Guile are > supported by the JIT. Set the GUILE_JIT_LOG environment variable to 1 > or 2 to see JIT progress. Just to be clear, does GUILE_JIT_THRESHOLD represents the number of times a given instruction pointer is hit? > For debugging (single-stepping, tracing, breakpoints), Guile will fall > back to the bytecode interpreter (the VM), for the thread that has > debugging enabled. Once debugging is no longer enabled (no more hooks > active), that thread can return to JIT-compiled code. Cool. > Using GNU Lightning has been useful but in the long term I don't think > it's the library that we need, for a few reasons: [...] It might be that the lightning 1.x branch would be a better fit (it was exactly as you describe.) I think that=E2=80=99s what Racket was (is?) usi= ng. > Meaning that "eval" in Guile 3 is somewhere around 80% faster than in > Guile 2.2 -- because "eval" is now JIT-compiled. Very cool. > Incidentally, as a comparison, Guile 2.0 (whose "eval" is slower for > various reasons) takes 70s real time for the same benchmark. Guile 1.8, > whose eval was written in C, takes 4.536 seconds real time. It's still > a little faster than Guile 3's eval-in-Scheme, but it's close and we're > catching up :) It=E2=80=99s an insightful comparison; soon we can say it=E2=80=99s =E2=80= =9Cas fast as hand-optimized C=E2=80=9D (and more readable, too :-)). > I have also tested with ecraven's r7rs-benchmarks and we make a nice > jump past the 2.2 results; but not yet at Racket or Chez levels yet. I > think we need to tighten up our emitted code. There's another 2x of > performance that we should be able to get with incremental improvements. > For the last bit we will need global register allocation though, I > think. Looking forward to reading ecraven=E2=80=99s updated benchmark results. Thank you for the awesomeness! Ludo=E2=80=99.