From: nisse@lysator.liu.se (Niels Möller)
To: marco.maggi-ipsu@poste.it
Cc: guile-user@gnu.org
Subject: [OT] Re: Question on mutability of argument lists
Date: Thu, 20 Mar 2014 11:54:57 +0100 [thread overview]
Message-ID: <nn7g7pxhq6.fsf@bacon.lysator.liu.se> (raw)
In-Reply-To: <87zjklgp5x.fsf_-_@governatore.luna> (Marco Maggi's message of "Thu, 20 Mar 2014 11:06:18 +0100")
Marco Maggi <marco.maggi-ipsu@poste.it> 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.
next prev parent reply other threads:[~2014-03-20 10:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 9:34 Question on mutability of argument lists Niels Möller
2014-03-19 17:01 ` Marco Maggi
2014-03-19 19:25 ` Mark H Weaver
2014-03-19 19:56 ` Niels Möller
2014-03-20 10:06 ` [OT] " Marco Maggi
2014-03-20 10:54 ` Niels Möller [this message]
2014-03-20 21:02 ` 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=nn7g7pxhq6.fsf@bacon.lysator.liu.se \
--to=nisse@lysator.liu.se \
--cc=guile-user@gnu.org \
--cc=marco.maggi-ipsu@poste.it \
/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).