X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fmanual%2Fefficiency.texinfo;h=20ab991c8c60e8e9d5ca5804d35e643fa486e2ec;hb=eed9254936fe91e36dd4dbca02c342021917eeb1;hp=ebd4a369eaafe00754539e851a46ee597fbec484;hpb=01b53542be411ba6ede003da5e7292e16602ab6e;p=sbcl.git diff --git a/doc/manual/efficiency.texinfo b/doc/manual/efficiency.texinfo index ebd4a36..20ab991 100644 --- a/doc/manual/efficiency.texinfo +++ b/doc/manual/efficiency.texinfo @@ -1,3 +1,6 @@ +@node Efficiency +@comment node-name, next, previous, up +@chapter Efficiency @cindex Efficiency FIXME: The material in the CMUCL manual about getting good @@ -159,15 +162,36 @@ it would not be in the following situation: because both the allocation of the @code{&rest} list and the variable binding are outside the scope of the @code{optimize} declaration. -There are many cases when dynamic-extent declarations could be useful. -At present, SBCL implements +There are many cases when @code{dynamic-extent} declarations could be +useful. At present, SBCL implements -@itemize +@itemize @item Stack allocation of @code{&rest} lists, where these are declared @code{dynamic-extent}. +@item +Stack allocation of @code{list} and @code{list*}, whose result is +bound to a variable, declared @code{dynamic-extent}, such as + +@lisp +(let ((list (list 1 2 3))) + (declare (dynamic-extent list) + ...)) +@end lisp + +or + +@lisp +(flet ((f (x) + (declare (dynamic-extent x)) + ...)) + ... + (f (list 1 2 3)) + ...) +@end lisp + @end itemize Future plans include