X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=OPTIMIZATIONS;h=c79f922af56f7b7a374b69f8cb15c589f7ed8c11;hb=04553847c4e0235ec0a78e96204ff08b86fc6cd7;hp=d8d018f3f164a5a9d57343e495ce1b445627ca77;hpb=d04b59670ab69405c4115ea3caac99fd62a4b7ab;p=sbcl.git diff --git a/OPTIMIZATIONS b/OPTIMIZATIONS index d8d018f..c79f922 100644 --- a/OPTIMIZATIONS +++ b/OPTIMIZATIONS @@ -218,3 +218,50 @@ SBCL cannot derive upper bound for I and uses generic arithmetic here: (So the constraint propagator or a possible future SSA-convertor should know the connection between an NLE and its CLEANUP.) +-------------------------------------------------------------------------------- +#27 +Initialization of stack-allocated arrays is inefficient: we always +fill the vector with zeroes, even when it is not needed (as for +platforms with conservative GC or for arrays of unboxed objectes) and +is performed later explicitely. +-------------------------------------------------------------------------------- +#28 +a. Accessing raw slots in structure instances is more inefficient than +it could be; if we placed raw slots before the header word, we would +not need to do arithmetic at runtime to access them. (But beware: +this would complicate handling of the interior pointer). + +b. (Also note that raw slots are currently disabled on HPPA) +-------------------------------------------------------------------------------- +#29 +Python is overly zealous when converting high-level CL functions, such +as MIN/MAX, LOGBITP, and LOGTEST, to low-level CL functions. Reducing +Python's aggressiveness would make it easier to effect changes such as + +x86-64: +* direct MIN/MAX on {SINGLE,DOUBLE}-FLOATs ({MIN,MAX}S{S,D}) + +x86{,-64}: +* direct LOGBITP on word-sized integers and fixnums (BT + JC) + +x86{,-64}/PPC: +* branch-free MIN/MAX on word-sized integers and fixnums +* efficient LOGTESTs on word-sized integers and fixnums (TEST / AND.) + +PPC: +* efficient LDB on word-sized integers and fixnums (RLWINM) + +etc., etc. + +The "easier" part claimed above would come about because the functions +would be available for :TRANSLATE through a VOP or similar, whereas with +the current architecture, one would have to pattern-match IR1. While +IR1 pattern-matching would be useful in other contexts, it seems better +here to attempt the direct :TRANSLATE route. + +I (NJF) don't know how to implement such architecture-specific +optimizations whilst keeping the high->low transformations for other +architectures. Certainly adding #!+/- magic in compiler/*.lisp could be +done, but such a solution is somewhat inelegant. Moving the relevant +DEFTRANSFORMs to the architecture-specific compiler/* areas is also +possible, but that would duplicate quite a bit of code.