From: Nathan Froyd Date: Wed, 11 Apr 2007 16:20:17 +0000 (+0000) Subject: 1.0.4.62: Enhance BIGNUM-REPLACE X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;ds=inline;h=ef662d47d2233111ed02c3890119fd1839139ca6;p=sbcl.git 1.0.4.62: Enhance BIGNUM-REPLACE * Only require one iteration variable if (EQL START1 START2) --- diff --git a/src/code/bignum.lisp b/src/code/bignum.lisp index 1ed5942..819ef3a 100644 --- a/src/code/bignum.lisp +++ b/src/code/bignum.lisp @@ -499,14 +499,21 @@ (declare (fixnum ,i1 ,i2)) (%bignum-set ,n-dest ,i1 (%bignum-ref ,n-src ,i2)))) - `(let ((,n-end1 ,end1) - (,n-end2 ,end2)) - (do ((,i1 ,start1 (1+ ,i1)) - (,i2 ,start2 (1+ ,i2))) - ((or (>= ,i1 ,n-end1) (>= ,i2 ,n-end2))) - (declare (type bignum-index ,i1 ,i2)) - (%bignum-set ,n-dest ,i1 - (%bignum-ref ,n-src ,i2)))))))) + (if (eql start1 start2) + `(let ((,n-end1 (min ,end1 ,end2))) + (do ((,i1 ,start1 (1+ ,i1))) + ((>= ,i1 ,n-end1)) + (declare (type bignum-index ,i1)) + (%bignum-set ,n-dest ,i1 + (%bignum-ref ,n-src ,i1)))) + `(let ((,n-end1 ,end1) + (,n-end2 ,end2)) + (do ((,i1 ,start1 (1+ ,i1)) + (,i2 ,start2 (1+ ,i2))) + ((or (>= ,i1 ,n-end1) (>= ,i2 ,n-end2))) + (declare (type bignum-index ,i1 ,i2)) + (%bignum-set ,n-dest ,i1 + (%bignum-ref ,n-src ,i2))))))))) (sb!xc:defmacro with-bignum-buffers (specs &body body) #!+sb-doc diff --git a/version.lisp-expr b/version.lisp-expr index 6bca730..863b227 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.4.61" +"1.0.4.62"