From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Allowing the choice of a VM engine? Date: Wed, 01 Sep 2010 18:04:16 +0200 Message-ID: <877hj5movz.fsf_-_@gnu.org> References: <8739vocnr0.fsf@gnu.org> <87hbk3uj8c.fsf@gnu.org> <87sk3nt326.fsf@gnu.org> <87iq4gfmp8.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1283357569 24180 80.91.229.12 (1 Sep 2010 16:12:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Sep 2010 16:12:49 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 01 18:12:46 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OqpvC-0000fb-B5 for guile-devel@m.gmane.org; Wed, 01 Sep 2010 18:12:44 +0200 Original-Received: from localhost ([127.0.0.1]:38715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oqpv1-0001yw-M8 for guile-devel@m.gmane.org; Wed, 01 Sep 2010 12:12:11 -0400 Original-Received: from [140.186.70.92] (port=48086 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqpnU-00075d-UH for guile-devel@gnu.org; Wed, 01 Sep 2010 12:04:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqpnQ-0004yM-Vu for guile-devel@gnu.org; Wed, 01 Sep 2010 12:04:24 -0400 Original-Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:56396) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqpnQ-0004yD-QM for guile-devel@gnu.org; Wed, 01 Sep 2010 12:04:20 -0400 X-IronPort-AV: E=Sophos;i="4.56,304,1280700000"; d="scan'208";a="56358336" Original-Received: from laptop-147-210-128-193.labri.fr (HELO nixey) ([147.210.128.193]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 01 Sep 2010 18:04:19 +0200 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 Fructidor an 218 de la =?iso-8859-1?Q?R=E9volutio?= =?iso-8859-1?Q?n?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: (Andy Wingo's message of "Mon, 19 Jul 2010 22:30:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10830 Archived-At: Hello! Andy Wingo writes: > On Thu 15 Jul 2010 23:40, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Just to make sure I understand, though: do you mean switching VMs =E2=80= =9Con >> the fly=E2=80=9D (i.e., changing the VM currently executing the code), or >> switching VMs statically, before booting? The latter (which is what I >> had in mind) seems easy to do=E2=80=93unless I overlook something, that = is. :-) > > Switching before booting would indeed be easier, and I grudgingly admit > perhaps a good idea, especially for small devices (Maemo, for example). > > I would prefer not to enshrine a "regular / debug" split again though. I > guess that's what really bothers me. It's especially egregious if you > can't switch at runtime. OK, understood. I agree that having to trade debugging support for performance was painful with 1.8 and earlier: you=E2=80=99d run your program =E2=80=9Cfast=E2=80=9D, i.e., without =E2=80=98--debug=E2=80=99, and then i= t would fail without leaving a backtrace or anything, so you=E2=80=99d have to run it again, =E2=80=9Csl= owly=E2=80=9D this time. However, I think the trade-off here (running =E2=80=9Cfast=E2=80=9D vs. hav= ing the ability to use VM hooks) is less acute. There are several ways we could allow users to make their choice: 1. Similarly to how DEVAL/CEVAL is chosen in 1.8, as proposed in <87sk3nt326.fsf@gnu.org>. 2. With a new specific command-line option to the =E2=80=98guile=E2=80=99= binary: =E2=80=98--disable-vm-hooks=E2=80=99, =E2=80=98--enable-vm-hooks=E2=80= =99, =E2=80=98--fast=E2=80=99, =E2=80=98--vm-engine=3Dregular=E2=80=99, etc. The advantage of (2) is that we can choose the default that we consider the most convenient for users, whereas (1) is biased towards =E2=80=9Cperformance=E2=80=9D by default. The downside of (2) is that such an option may become pointless when JIT/AOT compilation is available. Another possibility would be to keep only the debug engine but somehow optimize the way VM hooks are handled. I=E2=80=99m afraid there=E2=80=99s = little room for optimization, though. What do you think? Thanks, Ludo=E2=80=99. PS: I=E2=80=99m reviving the thread because I=E2=80=99m consistently seeing= a 10% performance degradation in the SRFI-1 rewrite in Scheme, which I=E2=80= =99m not comfortable with (not that =E2=80=9Chigher-level languages are inefficient=E2=80=9D song again!).