unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Allowing the choice of a VM engine?
Date: Wed, 01 Sep 2010 18:04:16 +0200	[thread overview]
Message-ID: <877hj5movz.fsf_-_@gnu.org> (raw)
In-Reply-To: <m3d3ujxlhq.fsf@unquote.localdomain> (Andy Wingo's message of "Mon, 19 Jul 2010 22:30:41 +0200")

Hello!

Andy Wingo <wingo@pobox.com> writes:

> On Thu 15 Jul 2010 23:40, ludo@gnu.org (Ludovic Courtès) writes:
>
>> Just to make sure I understand, though: do you mean switching VMs “on
>> the fly” (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–unless 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’d run your program
“fast”, i.e., without ‘--debug’, and then it would fail without leaving
a backtrace or anything, so you’d have to run it again, “slowly” this
time.

However, I think the trade-off here (running “fast” vs. having 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 ‘guile’ binary:
     ‘--disable-vm-hooks’, ‘--enable-vm-hooks’, ‘--fast’,
     ‘--vm-engine=regular’, 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
“performance” 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’m afraid there’s little room
for optimization, though.

What do you think?

Thanks,
Ludo’.

PS: I’m reviving the thread because I’m consistently seeing a 10%
    performance degradation in the SRFI-1 rewrite in Scheme, which I’m
    not comfortable with (not that “higher-level languages are
    inefficient” song again!).



  parent reply	other threads:[~2010-09-01 16:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-12 22:57 SRFI-1 in Scheme Ludovic Courtès
2010-07-13 21:25 ` Andy Wingo
2010-07-13 22:09   ` Ludovic Courtès
2010-07-13 22:27     ` Andy Wingo
2010-07-13 22:44       ` Ludovic Courtès
2010-07-14  7:41         ` Andy Wingo
2010-07-15 21:40           ` Ludovic Courtès
2010-07-19 20:30             ` Andy Wingo
2010-07-20 16:35               ` Ludovic Courtès
2010-07-20 20:11                 ` Andy Wingo
2010-07-21 23:10                   ` Ludovic Courtès
2010-07-20 20:15                 ` Andy Wingo
2010-09-01 16:04               ` Ludovic Courtès [this message]
2010-09-03  5:23                 ` Allowing the choice of a VM engine? Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hj5movz.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).