1.0.37.38: micro-optimizations of CONCATENATE bits
authorNathan Froyd <froydnj@cs.rice.edu>
Mon, 5 Apr 2010 20:04:19 +0000 (20:04 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Mon, 5 Apr 2010 20:04:19 +0000 (20:04 +0000)
- 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
src/compiler/seqtran.lisp
version.lisp-expr

index 6f4ba71..4fb5911 100644 (file)
 (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))
index 68aa5b3..3c7fa16 100644 (file)
                (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))
           `(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)))
index ec3a0b2..5192c68 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.37.37"
+"1.0.37.38"