From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: [VM] Tail recursion and multiple values
Date: Mon, 02 Mar 2009 19:03:28 +0100 [thread overview]
Message-ID: <m3r61fkdjj.fsf@pobox.com> (raw)
In-Reply-To: <87y6vox0s9.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 02 Mar 2009 00:48:22 +0100")
Heya,
On Mon 02 Mar 2009 00:48, ludo@gnu.org (Ludovic Courtès) writes:
>> 1) It is expected that you don't have tail recursion between
>> interpreted and VM code.
>>
>> 2) This particular problem manifests itself in that call-with-values
>> is VM code (when r5rs.scm is compiled).
>
> (The latter is what I meant to say in my message.)
>
> As for (1), I'm unsure. The issue is that as long as running code with
> the interpreter is the default, people may hit this kind of problem,
> which is, well, problematic. Now, I have no idea how this could be
> solved without resorting to dirty hacks such as the one you suggested.
Yeah. It is certainly a counterintuitive situation. The compiler
recognizes both call-with-values and @call-with-values, so we could just
not compile call-with-values; less nasty, but still nasty, and penalizes
the vm in the (apply call-with-values ...) case.
> As a side note, I think it makes sense to keep the interpreter as the
> default when evaluating `.scm' files
Sure, for now -- or we could do what python does, and automatically
create .go files as needed (and if possible). Then it would certainly
pay off over time, and the compilation time would probably be a wash
because in that case the .scm probably isn't even in the disk cache.
> the program is short-lived
This would be the normal case
> if the compiler performs smart optimizations,
Hahaahaha!
More seriously, I think that the bar for including optimizations in the
normal compilation path will be if they actually speed up the compiler
as well (since the compiler is self-compiled).
Cheers,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2009-03-02 18:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-28 14:27 [VM] Tail recursion and multiple values Ludovic Courtès
2009-02-28 14:45 ` Ludovic Courtès
2009-03-01 20:31 ` Andy Wingo
2009-03-01 23:48 ` Ludovic Courtès
2009-03-02 18:03 ` Andy Wingo [this message]
2009-03-02 21:55 ` Ludovic Courtès
2009-03-02 23:15 ` Andy Wingo
2009-03-02 23:33 ` Andreas Rottmann
2009-03-02 23:43 ` Eduardo Cavazos
2009-03-03 23:45 ` Ludovic Courtès
2009-03-04 22:11 ` Clinton Ebadi
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=m3r61fkdjj.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/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).