sbcl Log

Commit Date  
[42fbc5] (15.1 kB) by Paul Khuong Paul Khuong

Bring OPTIMIZATIONS up to date

Some of these things were implemented months or a few years ago.

Also, fix the header for NEWS.

2011-08-31 13:05:16 View
[a18894] (15.8 kB) by Christophe Rhodes Christophe Rhodes compress most unibyte-external-format definitions

All the unibyte-mapper-based external-formats had huge amounts of
cut-and-pasted code, differing only in names of functions. This is,
oddly enough, a clear case for abstracting away the repeated code into a

In the process, convert them to the multibyte apparatus, which has support
for the nice restarts, and remove the too-simple unibyte

Include a far-from-comprehensive set of tests, which are mostly for
iso-8859-x formats

2009-11-11 17:34:09 View
[e840f4] (14.9 kB) by Nikodemus Siivola Nikodemus Siivola better MAKE-ARRAY transforms

* Add a source transform for MAKE-ARRAY that declaims LIST and VECTOR
as NOTINLINE, so the the MAKE-ARRAY deftransforms are able to pick
them apart (for DIMENSIONS and :INITIAL-CONTENTS.)

* INITIALIZE-VECTOR is a new magic function with a IR2-CONVERT
transform. It's purpose is to allow open coding :INITIAL-CONTENTS
initialization without inhibiting stack allocation.

* Turns out that making stack allocation decisions during locall
analysis is not enough since optimization iterates: if a transform
occurs and introduces new LVARs that would be good for DX after
the locall analysis has run for the combination, the new LVARs
will not get their share of stacky goodness. Therefore, after
a transform propagate DX information to the new functional

* The new logic is in TRANSFORM-MAKE-ARRAY-VECTOR, which handles
all the cases of vector allocation with a known element type:

are picked apart when the length matches the vector length,
and their arguments are spliced into the call.

Constant :INITIAL-CONTENTS is picked apart as well.

Initialization is done using INITIALIZE-VECTOR.

** Otherwise :INITIAL-CONTENTS is splatted in place using
REPLACE after we have checked that the length matches.

** :INITIAL-ELEMENT not EQL to the default element uses

** Otherwise the default initialization is fine.

Some additional hair here, since MAYBE-PROPAGATE-DYNAMIC-EXTENT
cannot deal with OPTIONAL-DISPATCH functionals. So to ensure we get
full benefit of it, make sure the lambdas we transform to have only
required arguments -- courtesy of new ELIMINATE-KEYWORD-ARGUMENT
utility. (Note: it might be worth it to do something like this for
many cases automatically, to reduce the number of lambdas the
compiler generates. For inline lambdas we could do the whole &key
handling _before_ the lambda is converted...)

* Identify the case of (LIST N) as dimensions as being a vector,

* More efficient allocation of simple multidimensional arrays in
the presence of :INITIAL-CONTENTS (still slow, though) and

* Fix the source transform for VECTOR so that it too can stack

* Updates tests and docs.

2009-05-16 12:23:13 View
[35ec0b] (14.7 kB) by Nikodemus Siivola Nikodemus Siivola CHAR-CODE type derivation

* Patch by Paul Khuong.

2009-01-02 16:05:28 View
[ff5c74] (14.8 kB) by Nikodemus Siivola Nikodemus Siivola OPTIMIZATION #23 is there already

* Type information for &REST lists is available after constraint

2009-01-02 15:11:08 View
[9264b5] (14.9 kB) by Nikodemus Siivola Nikodemus Siivola elide runtime calls to %COERCE-CALLABLE-TO-FUN in more cases

* Core change: %COERCE-CALLABLE-TO-FUN can now convert to

* While at it, refactor the whole "make up a form that returns a
function to use instead of this lvar or source form" thing for

* Record slightly crazy OPTIMIZATION possibility.

2008-07-31 12:52:37 View
[45bc30] (14.5 kB) by Nikodemus Siivola Nikodemus Siivola refactor handling of constants in the compiler

* Coalesce non-circular lists, bit-vectors, and non-base-strings in the
file-compiler. (We could do more, but these are the "easy" ones.) Takes
care of OPTIMIZATIONS #34 in practice: outside the file compiler one can
still trick the system into similar behaviour, but that seems a fairly
academic concern.

* Never go through SYMBOL-VALUE at runtime to fetch the value of a constant
variable in compiled code.

* Use (SYMBOL-VALUE <NAME>) as the load-form to dump references to named
constants into fasls.

* Signal a continuable error if an attempt to change the SYMBOL-VALUE of a
constant variable is made.

* Assignments to undefined variables go through SET, so that one
cannot accidentally modify a constant by doing something like:

(defun set-foo (x) (setq foo x))
(defconstant foo 42)
(set-foo 13)

* Gets rid of INFO :VARIABLE :CONSTANT-VALUE, and just uses SYMBOL-VALUE to
store constant values.

* Move definition of SB!XC:LAMBDA-LIST-KEYWORDS to be beginning of the build,
and use it instead of the host LAMBDA-LIST-KEYWORDS where appropriate.

* Tests.

2008-06-04 12:39:38 View
[975f19] (15.7 kB) by Nikodemus Siivola Nikodemus Siivola multiply-used DX LVARS

* HANDLE-NESTED-DYNAMIC-EXTENT maps over all the uses of the LVAR,
collecting their argument lvars as well.

* RECHECK-DYNAMIC-EXTENT-LVARS accepts multiply-used DX LVARs,
checking that all uses support stack allocation.

* UPDATE-UVL-LIVE-SETS accepts multiply-used DX LVARs, doing that
lifetime merging with all uses.

* ...and OOPS, move the NEWS entries of .5 and .6 to a new section for

2007-09-26 16:00:44 View
[6d69df] (15.9 kB) by Nikodemus Siivola Nikodemus Siivola nested DX allocation

* RECOGNIZE-DYNAMIC-EXTENT-LVARS needs to propagate DX information to
combination arguments, so that

(LET ((X (LIST (LIST 1 2) (LIST 3 4))))
(FOO X))

does the right thing.

2007-09-26 15:54:58 View
[66cff1] (16.2 kB) by Nikodemus Siivola Nikodemus Siivola dynamic-extent CONS

* Extend EMIT-FIXED-ALLOC to support stack-allocation.

* Appropriate DEFOPTIMIZER for CONS.

Note: it seems like it should be a simple matter to support stack
allocation of all primitive objects allocated using the :ALLOC-TRANS

2007-09-26 15:44:23 View
[90c2b0] (16.4 kB) by Nikodemus Siivola Nikodemus Siivola small CLOS cache improvements

* General PCL cleanups:
-- Get rid of FUNCTION-FUNCALL and FUNCTION-APPLY: instead just
declare the argument type. ETOOMANYLAYERSOFABSTRACTION.
-- Implement the unused GET-FUN in terms of GET-FUN1 for clarity.

* Use a single bitmask instead of multiply and mask to compute the
cache index (like the original implementation).

* Slower probe depth limit growth: caches with 1024 lines used to
have probe depth 16, which is starting to be on the slow side, and
some fairly common generics like PRINT-OBJECT have caches with
enough entries that they will be large no matter what. Instead of
(ceiling (sqrt lines) 2) make it (ceiling (sqrt (sqrt lines))).

* Better CACHE-HAS-INVALID-ENTRIES-P (does less work, picks up
incomplete lines.)


* Typo in the format string in PRINT-OBJECT (CACHE T).

* A couple of non-CLOS optimization possibilities recorded.

2007-06-08 08:37:10 View
[bef0d9] (15.7 kB) by Nathan Froyd Nathan Froyd Undo D-X changes in

2007-04-11 20:51:56 View
[43b175] (15.5 kB) by Nathan Froyd Nathan Froyd Don't zeroize dynamic-extent simple-unboxed-arrays on x86 and x86-64

2007-04-11 16:35:27 View
[f68d0f] (15.4 kB) by Juho Snellman Juho Snellman
Add RESTART-FRAME command to the debugger, reduce the runtime cost
of the debug catch tags.

* Change the debugger catch tag to funcall the thrown value, rather
than just returning it.
* Make RETURN throw a thunk that returns an appropriate value,
and RESTART-FRAME throw a thunk that calls the same function again
with the same arguments.
* Always emit the debug catch with a static tag, rather than consing
up a new tag every time the catch is entered.
* To ensure that the tags are unique, the RETURN and RESTART-FRAME
commands will first cons up a new tag, find the right catch-block
structure on the stack, assign the new tag to the tag slot, and
then throw the new tag.
* Don't add the catch tags to some uninteresting (usually
compiler-generated) functions, to reduce the compilation speed

2007-01-09 03:25:02 View
[eb3db8] (15.1 kB) by Nathan Froyd Nathan Froyd

2006-07-29 21:50:39 View
[887797] (12.4 kB) by Nathan Froyd Nathan Froyd
Brain-dump some OPTIMIZATIONS.

2006-05-23 21:33:39 View
[51344a] (9.4 kB) by Nathan Froyd Nathan Froyd
Introduce new vm-support-routine COMBINATION-IMPLEMENTATION-STYLE
for letting the backend have a crack at implementing certain
functions directly (cf. OPTIMIZATIONS, #29);
...implement a few efficient cases for PPC and x86.

2006-02-07 02:35:25 View
[6c2c95] (9.9 kB) by Nathan Froyd Nathan Froyd
Minor cleanups:

* INSTALL spelling fix by Luis Oliveira;
* dependent policy LET-CONVERTION => LET-CONVERSION;
* Note optimization opportunity in OPTIMIZATIONS.

2005-08-15 22:00:39 View
[d319b9] (9.5 kB) by Nathan Froyd Nathan Froyd
* MAKE-FIXNUM on PPC now takes one instruction rather than two;
* signed-num INTEGER-LENGTH VOP on PPC does not require a
temporary register;
* Added unsigned-num INTEGER-LENGTH VOP on PPC;
* Musings on processor-specific micro-optimizations added to

2005-07-26 18:51:43 View
[f3f677] (8.1 kB) by Christophe Rhodes Christophe Rhodes
Merge DFL raw-slots patch (sbcl-devel "raw slot changes"
... with an amalgam of ths' two mips versions;
... note in OPTIMIZATIONS about the negative index idea, and the
disabledness of HPPA

2005-06-12 14:02:34 View
[69ef68] (7.7 kB) by Alexey Dejneka Alexey Dejneka
* Changed implementation on ALLOCATE-VECTOR on X86:
... two VOPs: A-V-ON-HEAP and A-V-ON-STACK;
... choice between them is made with LTN-ANALYZEr;
... A-V-ON-STACK always fills vector with zeroes (fixes bug
reported by Brian Downing).

2005-04-19 05:54:17 View
[d04b59] (7.4 kB) by Nikodemus Siivola Nikodemus Siivola implement optimization #25
* transform EQL to EQ when at least other argument is known to be

2005-04-14 14:05:20 View
[c097c9] (7.9 kB) by Alexey Dejneka Alexey Dejneka
* Fix MISC.535: CONSTANT-LVAR-P looks through CASTs.
* Workaround lack of recursion recognition in XC for

2005-02-23 08:31:18 View
[f846a7] (7.9 kB) by Alexey Dejneka Alexey Dejneka
* Fix MISC.527: DEFTRANSFORM for BIT-AND and similar for
vectors use (ARRAY-DIMENSION v 0) instead if LENGTH to get
the full vector size.

2005-02-20 18:53:13 View
[9afd39] (7.4 kB) by Paul F. Dietz Paul F. Dietz

Added optimization opportunity #25: improved type-based optimization
of EQL forms.

2005-02-09 23:48:45 View
Older >

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks