0.8.12.33:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 14 Jul 2004 20:26:16 +0000 (20:26 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 14 Jul 2004 20:26:16 +0000 (20:26 +0000)
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

NEWS
OPTIMIZATIONS
src/compiler/array-tran.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index e8efa95..705db45 100644 (file)
--- 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
index 6eed380..0ca48de 100644 (file)
@@ -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.
+--------------------------------------------------------------------------------
index 970c92d..abf8141 100644 (file)
 
 ;;; 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)
index a7cc2a8..7638b99 100644 (file)
@@ -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"