unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
To: Andy Wingo <wingo@pobox.com>
Cc: Daniel Kraft <d@domob.eu>, guile-devel <guile-devel@gnu.org>,
	Neil Jerram <neil@ossau.uklinux.net>
Subject: Re: Elisp performance
Date: Tue, 4 Aug 2009 11:58:56 -0400	[thread overview]
Message-ID: <A4FE4852-B502-4C0C-AA99-E6C10FE2AC07@raeburn.org> (raw)
In-Reply-To: <m3eirrevd2.fsf@pobox.com>

On Aug 4, 2009, at 06:17, Andy Wingo wrote:
> Hello!
>
> (Was away for the weekend, but back hacking all week now.)

Welcome back!

> On Thu 30 Jul 2009 22:18, Neil Jerram <neil@ossau.uklinux.net> writes:
> Daniel Kraft <d@domob.eu> writes:
>>
>>> Lambda arguments are still always dynamically bound, which is  
>>> quite a
>>> pity as it inhibits tail-call optimization;
> Indeed, a pity. Though self-tail calls can be optimized... still,
> irritating.

In the compiler, or in the byte-code engine?

The Emacs byte compiler does not do self-tail call optimizations.   
Since the function value of a symbol can be copied out and/or replaced  
(and Emacs ships with the "advice" package which does both), the  
symbol's function value may wind up not being the function body being  
compiled; turning a self-tail call into a jump back to the beginning  
would cause observable behavior changes from what happens now.

On the other hand, I haven't looked at what elisp compiles to in  
Guile; maybe it's possible to have the byte-code engine detect when  
you're making a tail call to yourself (such as recursive calls when  
the function value slot hasn't been messed with) and optimize them on  
the fly?

Ken




  parent reply	other threads:[~2009-08-04 15:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29 12:50 Elisp performance Daniel Kraft
2009-07-30  3:23 ` Ken Raeburn
2009-07-31  5:15   ` Daniel Kraft
2009-08-04 15:51   ` Andy Wingo
2009-07-30 20:18 ` Neil Jerram
2009-07-30 23:54   ` Ken Raeburn
2009-07-31  6:09     ` Daniel Kraft
2009-08-04 10:26       ` Andy Wingo
2009-08-04 10:26     ` Andy Wingo
2009-07-31  6:02   ` Daniel Kraft
2009-07-31  9:59     ` Ken Raeburn
2009-07-31 15:14       ` Daniel Kraft
2009-08-04 11:14         ` Andy Wingo
2009-08-04 11:00     ` Andy Wingo
2009-08-08 22:15       ` Ludovic Courtès
2009-08-04 10:17   ` Andy Wingo
2009-08-04 10:54     ` Daniel Kraft
2009-08-04 15:58     ` Ken Raeburn [this message]
2009-08-04 15:47 ` Andy Wingo
2009-08-04 16:12   ` Ken Raeburn
2009-08-04 19:28     ` Andy Wingo
2009-08-04 16:17   ` Daniel Kraft
2009-08-04 19:25     ` 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=A4FE4852-B502-4C0C-AA99-E6C10FE2AC07@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=d@domob.eu \
    --cc=guile-devel@gnu.org \
    --cc=neil@ossau.uklinux.net \
    --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).