[comp.lang.lisp] call-arguments-limit

barmar@think.COM (Barry Margolin) (11/02/88)

In article <1350018@otter.hple.hp.com> sfk@otter.hple.hp.com (Stephen Knight) writes:
>jcp@arizona.edu (John Peterson) writes:
>> The discussion [comparing different ways to sum a list]
>> ignores a basic limitation of Common Lisp: call-arguments-limit. 
>A very good point!  I would be interested in the typical values of this
>system parameter.  Poplog CL has a default call-arguments-limit of 
>536870912.  Is this unusual?

On a Symbolics Lisp Machine running Genera 7.2 it is 128.

The reason for this limit is that the instructions for accessing
arguments on the stack only have a seven-bit (unsigned) field for
specifying the argument offset.

However, I was able to APPLY #'+ to a 1000-element list because the
mechanism for applying a function with an &REST argument shares the
list that is the last argument to APPLY.  Therefore, the list never
gets copied to the stack, and the function never actually refers to
the arguments positionally.  It's as if the &REST argument were an
ordinary argument and FUNCALL were being used instead of APPLY.

Barry Margolin
Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar