From: Christophe Rhodes Date: Wed, 14 Jul 2004 20:26:16 +0000 (+0000) Subject: 0.8.12.33: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=3a4229d4a91f04da79dfc7366433682f8c979f0a;p=sbcl.git 0.8.12.33: Minor adjustment to BIT, SBIT source transforms ... assert the dimensionality of the bit array based on the number of arguments in the call; ... note potential for further optimization in OPTIMIZATIONS --- diff --git a/NEWS b/NEWS index e8efa95..705db45 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ changes in sbcl-0.8.13 relative to sbcl-0.8.12: user-defined methods on SLOT-BOUNDP-USING-CLASS and (SETF SLOT-VALUE-USING-CLASS), and no longer causes errors with non-standard SLOT-DEFINITION-ALLOCATION values. + * optimization: improved performance of BIT and SBIT on bit-vectors. changes in sbcl-0.8.12 relative to sbcl-0.8.11: * minor incompatible change: the system no longer provides diff --git a/OPTIMIZATIONS b/OPTIMIZATIONS index 6eed380..0ca48de 100644 --- a/OPTIMIZATIONS +++ b/OPTIMIZATIONS @@ -177,3 +177,11 @@ then cons up a bignum for it: It is commonly expected for Python to derive (FIXNUMP I). (If ``='' is replaced with ``>='', Python will do.) -------------------------------------------------------------------------------- +#17 +Type tests for (ARRAY BIT), (ARRAY T) and similar go through full +%TYPEP, even though it is relatively simple to establish the arrayness +of an object and also to obtain the element type of an array. As of +sbcl-0.8.12.30, this affects at least DUMP-OBJECT through +COMPOUND-OBJECT-P, and (LABELS MAYBE-EMIT-MAKE-LOAD-FORMS GROVEL) +through TYPEP UNBOXED-ARRAY, within the compiler itself. +-------------------------------------------------------------------------------- diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index 970c92d..abf8141 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -650,14 +650,20 @@ ;;; We convert all typed array accessors into AREF and %ASET with type ;;; assertions on the array. -(macrolet ((define-frob (reffer setter type) +(macrolet ((define-bit-frob (reffer setter simplep) `(progn (define-source-transform ,reffer (a &rest i) - `(aref (the ,',type ,a) ,@i)) + `(aref (the (,',(if simplep 'simple-array 'array) + bit + ,(mapcar (constantly '*) i)) + ,a) ,@i)) (define-source-transform ,setter (a &rest i) - `(%aset (the ,',type ,a) ,@i))))) - (define-frob sbit %sbitset (simple-array bit)) - (define-frob bit %bitset (array bit))) + `(%aset (the (,',(if simplep 'simple-array 'array) + bit + ,(cdr (mapcar (constantly '*) i))) + ,a) ,@i))))) + (define-bit-frob sbit %sbitset t) + (define-bit-frob bit %bitset nil)) (macrolet ((define-frob (reffer setter type) `(progn (define-source-transform ,reffer (a i) diff --git a/version.lisp-expr b/version.lisp-expr index a7cc2a8..7638b99 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.12.32" +"0.8.12.33"