;;;; -*- coding: utf-8; fill-column: 78 -*-
+ * optimization: multidimensional array accesses in the absence of type
+ information regarding array rank are approximately 10% faster due to
+ open coding of ARRAY-RANK.
* bug fix: disable address space randomization Linux/x86-64 as well,
not just x86-64. (reported by Ken Olum)
* bug fix: #201; type inference for CONS and ARRAY types could derive
(deftransform array-rank ((array))
(let ((array-type (lvar-type array)))
(let ((dims (array-type-dimensions-or-give-up array-type)))
- (if (not (listp dims))
- (give-up-ir1-transform
- "The array rank is not known at compile time: ~S"
- dims)
- (length dims)))))
+ (cond ((listp dims)
+ (length dims))
+ ((eq t (array-type-complexp array-type))
+ '(%array-rank array))
+ (t
+ `(if (array-header-p array)
+ (%array-rank array)
+ 1))))))
;;; If we know the dimensions at compile time, just use it. Otherwise,
;;; if we can tell that the axis is in bounds, convert to
;;; 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".)
-"1.0.28.8"
+"1.0.28.9"