guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OT] Re: Question on mutability of argument lists


From: Niels Möller
Subject: [OT] Re: Question on mutability of argument lists
Date: Thu, 20 Mar 2014 11:54:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (usg-unix-v)

Marco Maggi <address@hidden> writes:

> Mh... I have very few functions accepting a single argument.

I think there are lots of standard functions with a single argument,
including many accessor functions, predicates, and conversion functions.
And some functions which accept a variable number of arguments have
special behaviour for exactly one argument. 

Can't say if it really is a worthwhile optimization with a separate
entry point, but it is a nice symmetry given that the same optimization
*is* worthwhile for continuations/return addresses.

> How  would  one  implement  continuations  when  a  function
> argument is in a register  (rather than on the Scheme stack,
> however implemented)?  In a complex way I presume.

I planned to have no stack. Instead all activation records would be
allocated on the heap. With inspiration from Appel's "Compiling with
continuations", which describes a compiler for Standard ML. If I
remember the reported benchmarks correctly, it typically allocated one
word of storage for every 5 machine instructions executed, and it still
had reasonably low overhead from gc.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]