From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nisse@lysator.liu.se (Niels =?iso-8859-1?Q?M=F6ller?=) Newsgroups: gmane.lisp.guile.user Subject: [OT] Re: Question on mutability of argument lists Date: Thu, 20 Mar 2014 11:54:57 +0100 Message-ID: References: <874n2unmvo.fsf@governatore.luna> <87txauouru.fsf@yeeloong.lan> <87zjklgp5x.fsf_-_@governatore.luna> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1395312914 23751 80.91.229.3 (20 Mar 2014 10:55:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Mar 2014 10:55:14 +0000 (UTC) Cc: guile-user@gnu.org To: marco.maggi-ipsu@poste.it Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Mar 20 11:55:23 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQad3-0002fD-Qh for guile-user@m.gmane.org; Thu, 20 Mar 2014 11:55:17 +0100 Original-Received: from localhost ([::1]:46280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQad3-0001xA-GU for guile-user@m.gmane.org; Thu, 20 Mar 2014 06:55:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQacs-0001wW-G1 for guile-user@gnu.org; Thu, 20 Mar 2014 06:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQaco-0001DY-3l for guile-user@gnu.org; Thu, 20 Mar 2014 06:55:06 -0400 Original-Received: from vindbrygga.lysator.liu.se ([2001:6b0:17:f0a0::de]:38092 helo=bacon.lysator.liu.se) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQacn-0001C3-OP for guile-user@gnu.org; Thu, 20 Mar 2014 06:55:02 -0400 Original-Received: from bacon.lysator.liu.se (localhost [127.0.0.1]) by bacon.lysator.liu.se (8.14.5+Sun/8.14.5) with ESMTP id s2KAswRP006552; Thu, 20 Mar 2014 11:54:58 +0100 (MET) Original-Received: (from nisse@localhost) by bacon.lysator.liu.se (8.14.5+Sun/8.14.5/Submit) id s2KAsvkI006551; Thu, 20 Mar 2014 11:54:57 +0100 (MET) X-Authentication-Warning: bacon.lysator.liu.se: nisse set sender to nisse@lysator.liu.se using -f In-Reply-To: <87zjklgp5x.fsf_-_@governatore.luna> (Marco Maggi's message of "Thu, 20 Mar 2014 11:06:18 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (usg-unix-v) X-MIME-Autoconverted: from 8bit to quoted-printable by bacon.lysator.liu.se id s2KAswRP006552 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:6b0:17:f0a0::de X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11143 Archived-At: Marco Maggi 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.=20 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 --=20 Niels M=F6ller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance.