From 769e1d8a825c587df85896dc971d0f90748e134e Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 5 Apr 2010 20:04:19 +0000 Subject: [PATCH] 1.0.37.38: micro-optimizations of CONCATENATE bits - Don't insert array bounds checks when inlining CONCATENATE. This particularly helps when smushing together constant strings. - Don't insert array bounds checks in the out-of-line CONCATENATE functions. - While we're here, tweak the REPLACE transforms to avoid bounds checking under appropriate policy. --- src/code/seq.lisp | 3 ++- src/compiler/seqtran.lisp | 3 ++- version.lisp-expr | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/code/seq.lisp b/src/code/seq.lisp index 6f4ba71..4fb5911 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -877,7 +877,8 @@ (macrolet ((def (name element-type) `(defun ,name (&rest sequences) (declare (dynamic-extent sequences) - (optimize speed)) + (optimize speed) + (optimize (sb!c::insert-array-bounds-checks 0))) (let* ((lengths (mapcar #'length sequences)) (result (make-array (the integer (apply #'+ lengths)) :element-type ',element-type)) diff --git a/src/compiler/seqtran.lisp b/src/compiler/seqtran.lisp index 68aa5b3..3c7fa16 100644 --- a/src/compiler/seqtran.lisp +++ b/src/compiler/seqtran.lisp @@ -776,7 +776,7 @@ (end1 (or end1 len1)) (end2 (or end2 len2)) (replace-len (min (- end1 start1) (- end2 start2)))) - ,(unless (policy node (= safety 0)) + ,(unless (policy node (= insert-array-bounds-checks 0)) `(progn (unless (<= 0 start1 end1 len1) (sequence-bounding-indices-bad-error seq1 start1 end1)) @@ -1122,6 +1122,7 @@ `(apply (lambda ,vars (declare (ignorable ,@vars)) + (declare (optimize (insert-array-bounds-checks 0))) (let* ((.length. (+ ,@lengths)) (.pos. 0) (.string. (make-string .length. :element-type ',element-type))) diff --git a/version.lisp-expr b/version.lisp-expr index ec3a0b2..5192c68 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.37.37" +"1.0.37.38" -- 1.7.10.4