Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Tail calls again?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Per Bothner  
View profile  
 More options Dec 13 2009, 10:22 pm
From: Per Bothner <p...@bothner.com>
Date: Sun, 13 Dec 2009 19:22:26 -0800
Local: Sun, Dec 13 2009 10:22 pm
Subject: Re: [jvm-l] Re: Tail calls again?
On 12/08/2009 05:39 AM, Kresten Krab Thorup wrote:

> FYI, I wrote a blob on how I encode tail recursion in Erjang:
> http://bit.ly/6XIma1 .

The "trampoline" mechanism you describe is basically what Kawa
does when in --full-tailcalls mode - the basic idea is of course
quite old.

(I suspect Erland's parameter-passing is faster, as Kawa could
do with some tuning here.  I've concentrated on the performance
of the default --no-full-tailcalls mode.)

Kawa does support "state-machine semantics" where mutually recursive
functions are compiled to gotos, even when in the --no-full-tailcalls
mode.  (This is fairly recent - it was implemented this Summer.)

Rather than a single function per class, Kawa compiles multiple
functions to a class, which reduces static footprint, at the cost of an
extra level of indirection (but only when calling an unknown function).

This link has a description of how Kawa implements functions, though it
is very sparse on how tail-call-elimination works:
http://www.gnu.org/software/kawa/internals/procedures.html
--
        --Per Bothner
p...@bothner.com   http://per.bothner.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.