1.0.6.8: improve (SUBSEQ FOO 0 ...) on arrays with elements >= word-size
authorNathan Froyd <froydnj@cs.rice.edu>
Fri, 1 Jun 2007 02:57:48 +0000 (02:57 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Fri, 1 Jun 2007 02:57:48 +0000 (02:57 +0000)
* check for a constant-valued start parameter and pass its value
  through to the loop-generating machinery.  Before we would have
  compared 'START to 0, which always fails; now we can recognize
  that case and generate better code.

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

index 2699964..c956a07 100644 (file)
                       (sb!impl::signal-bounding-indices-bad-error seq start end))))
          (let* ((size (- end start))
                 (result (make-array size :element-type ',element-type)))
-           ,(maybe-expand-copy-loop-inline 'seq 'start 'result 0 'size element-type)
+           ,(maybe-expand-copy-loop-inline 'seq (if (constant-lvar-p start)
+                                                    (lvar-value start)
+                                                    'start)
+                                           'result 0 'size element-type)
            result)))))
 
 (deftransform copy-seq ((seq) ((or (simple-unboxed-array (*)) simple-vector)) *)
index 7355f83..9947068 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.6.7"
+"1.0.6.8"