From: Christophe Rhodes Date: Wed, 17 Mar 2004 20:24:16 +0000 (+0000) Subject: 0.8.8.30: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=b3f188843330c56bd4d17a3c930e73f573b1c71f;p=sbcl.git 0.8.8.30: Remove unnecessary bounds checks from REPLACE, VECTOR-POP and VECTOR-PUSH-EXTEND (Juho Snellman sbcl-devel 2004-03-17) --- diff --git a/CREDITS b/CREDITS index cc6b6d1..bb87d4b 100644 --- a/CREDITS +++ b/CREDITS @@ -651,6 +651,10 @@ Nikodemus Siivola: He provided build fixes, in particular to tame the SunOS toolchain, and has fixed many (stream-related and other) bugs besides. +Juho Snellman: + He provided several performance enhancements, including a better hash + function on strings, and removal of unneccessary bounds checks. + Brian Spilsbury: He wrote Unicode-capable versions of SBCL's character, string, and stream types and operations on them. diff --git a/NEWS b/NEWS index 180f239..61d8a4b 100644 --- a/NEWS +++ b/NEWS @@ -2330,6 +2330,8 @@ changes in sbcl-0.8.9 relative to sbcl-0.8.8: * optimization: the hash algorithm for strings has changed to one that is less vulnerable to spurious collisions. (thanks to Juho Snellman) + * optimization: VECTOR-POP, VECTOR-PUSH-EXTEND and REPLACE do less + needless bounds checking. (thanks to Juho Snellman) * optimization: implemented multiplication as a modular (UNSIGNED-BYTE 32) operation on the PPC backend. * fixed some bugs revealed by Paul Dietz' test suite: diff --git a/src/code/array.lisp b/src/code/array.lisp index 733b8c3..0a76afa 100644 --- a/src/code/array.lisp +++ b/src/code/array.lisp @@ -643,7 +643,9 @@ (declare (fixnum fill-pointer)) (when (= fill-pointer (%array-available-elements vector)) (adjust-array vector (+ fill-pointer extension))) - (setf (aref vector fill-pointer) new-element) + ;; disable bounds checking + (locally (declare (optimize (safety 0))) + (setf (aref vector fill-pointer) new-element)) (setf (%array-fill-pointer vector) (1+ fill-pointer)) fill-pointer)) @@ -656,9 +658,12 @@ (declare (fixnum fill-pointer)) (if (zerop fill-pointer) (error "There is nothing left to pop.") - (aref array - (setf (%array-fill-pointer array) - (1- fill-pointer)))))) + ;; disable bounds checking (and any fixnum test) + (locally (declare (optimize (safety 0))) + (aref array + (setf (%array-fill-pointer array) + (1- fill-pointer))))))) + ;;;; ADJUST-ARRAY diff --git a/src/code/seq.lisp b/src/code/seq.lisp index 777ee4a..d7d1f43 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -472,6 +472,8 @@ (1- source-index))) ((= target-index (the fixnum (1- target-start))) target-sequence) (declare (fixnum target-index source-index)) + ;; disable bounds checking + (declare (optimize (safety 0))) (setf (aref target-sequence target-index) (aref source-sequence source-index)))) (do ((target-index target-start (1+ target-index)) @@ -480,6 +482,8 @@ (= source-index (the fixnum source-end))) target-sequence) (declare (fixnum target-index source-index)) + ;; disable bounds checking + (declare (optimize (safety 0))) (setf (aref target-sequence target-index) (aref source-sequence source-index))))) diff --git a/version.lisp-expr b/version.lisp-expr index 16835dc..061a950 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".) -"0.8.8.29" +"0.8.8.30"