From: Nathan Froyd Date: Fri, 1 Dec 2006 16:35:09 +0000 (+0000) Subject: 1.0.0.8: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=16847788605758f428ba9fc3f0f16bfcfda4a4e9;p=sbcl.git 1.0.0.8: Elide array bounds checks when inlining the FIND and POSITION family of functions. --- diff --git a/NEWS b/NEWS index 5e20914..7e172cf 100644 --- 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. diff --git a/src/compiler/seqtran.lisp b/src/compiler/seqtran.lisp index 57a9d0f..323dcad 100644 --- a/src/compiler/seqtran.lisp +++ b/src/compiler/seqtran.lisp @@ -972,7 +972,11 @@ ,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 diff --git a/version.lisp-expr b/version.lisp-expr index 740ee63..14a8868 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".) -"1.0.0.7" +"1.0.0.8"