X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Fmanual%2Fefficiency.texinfo;h=5c94214b405157de358275aee539336cd92117f1;hb=d08b394edb36c45ae3b9d535135e5ef600f566f3;hp=b6d67fe86852e94688c15b176d4bc8e1735095aa;hpb=734d12cde18123c2608118d044f4c7701e4f2610;p=sbcl.git diff --git a/doc/manual/efficiency.texinfo b/doc/manual/efficiency.texinfo index b6d67fe..5c94214 100644 --- a/doc/manual/efficiency.texinfo +++ b/doc/manual/efficiency.texinfo @@ -4,10 +4,11 @@ @cindex Efficiency @menu -* Slot access:: -* Dynamic-extent allocation:: -* Modular arithmetic:: -* Miscellaneous Efficiency Issues:: +* Slot access:: +* Dynamic-extent allocation:: +* Modular arithmetic:: +* Global and Always-Bound variables:: +* Miscellaneous Efficiency Issues:: @end menu @node Slot access @@ -92,14 +93,14 @@ useful. At present, SBCL implements stack allocation for @code{&rest} lists, when these are declared @code{dynamic-extent}. @item -@code{cons}, @code{list} and @code{list*}, when the result is bound to -a variable declared @code{dynamic-extent}. +@code{cons}, @code{list}, @code{list*}, and @code{vector} when the +result is bound to a variable declared @code{dynamic-extent}. @item simple forms of @code{make-array}, whose result is bound to a variable declared @code{dynamic-extent}: stack allocation is possible only if -the resulting array is one-dimensional, and the call has no keyword -arguments with the exception of @code{:element-type}. +the resulting array is known to be both simple and one-dimensional, +and has a constant @code{:element-type}. @strong{Note}: stack space is limited, so allocation of a large vector may cause stack overflow. For this reason potentially large vectors, @@ -223,6 +224,36 @@ argument. ``Good'' widths are 32 on HPPA, MIPS, PPC, Sparc and x86 and 64 on Alpha. While it is possible to support smaller widths as well, currently this is not implemented. +@node Global and Always-Bound variables +@comment node-name, next, previous, up +@section Global and Always-Bound variables + +@include macro-sb-ext-defglobal.texinfo + +@deftp {Declaration} sb-ext:global + +Syntax: @code{(sb-ext:global symbol*)} + +Only valid as a global proclamation. + +Specifies that the named symbols cannot be proclaimed or locally +declared @code{special}. Proclaiming an already special or constant +variable name as @code{global} signal an error. Allows more efficient +value lookup in threaded environments in addition to expressing +programmer intention. +@end deftp + +@deftp {Declaration} sb-ext:always-bound + +Syntax: @code{(sb-ext:always-bound symbol*)} + +Only valid as a global proclamation. + +Specifies that the named symbols is always bound. Inhibits @code{makunbound} +of the named symbols. Proclaiming an unbound symbol as @code{always-bound} signals +an error. Allows compiler to elide boundness checks from value lookups. +@end deftp + @node Miscellaneous Efficiency Issues @comment node-name, next, previous, up @section Miscellaneous Efficiency Issues