1.0.0.8:
authorNathan Froyd <froydnj@cs.rice.edu>
Fri, 1 Dec 2006 16:35:09 +0000 (16:35 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Fri, 1 Dec 2006 16:35:09 +0000 (16:35 +0000)
Elide array bounds checks when inlining the FIND and POSITION
  family of functions.

NEWS
src/compiler/seqtran.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 5e20914..7e172cf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ changes in sbcl-1.0.1 relative to sbcl-1.0:
   * bug fix: non-required arguments were not passed correctly when a method
     defined using DEFMETHOD was called from a mop-generated method using
     CALL-NEXT-METHOD (reported by Pascal Costanza)
+  * optimization: the FIND and POSITION family of sequence functions
+    are significantly faster on arrays whose element types have been
+    declared.
 
 changes in sbcl-1.0 relative to sbcl-0.9.18:
   * improvement: experimental support for threading on FreeBSD/x86.
index 57a9d0f..323dcad 100644 (file)
                                 ,n-sequence ,start ,n-end)))
          (block ,block
            (macrolet ((maybe-return ()
-                        '(let ((,element (aref ,sequence ,index)))
+                        ;; WITH-ARRAY-DATA has already performed bounds
+                        ;; checking, so we can safely elide the checks
+                        ;; in the inner loop.
+                        '(let ((,element (locally (declare (optimize (insert-array-bounds-checks 0)))
+                                           (aref ,sequence ,index))))
                            (when ,done-p-expr
                              (return-from ,block
                                (values ,element
index 740ee63..14a8868 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".)
-"1.0.0.7"
+"1.0.0.8"