From: Juho Snellman Date: Fri, 28 Oct 2005 12:16:24 +0000 (+0000) Subject: 0.9.6.7: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=5c0fcb42f51d23c074e2857e5496575c9731b880;p=sbcl.git 0.9.6.7: Specialize the sequence functions used for newline-handling in FD-SOUT for the common cases of SIMPLE-BASE-STRING / (SIMPLE-ARRAY CHARACTER). --- diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 945790e..3d6cb0f 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -502,15 +502,26 @@ (end (or end (length (the vector thing))))) (declare (fixnum start end)) (if (stringp thing) - (let ((last-newline (and (find #\newline (the simple-string thing) - :start start :end end) - ;; FIXME why do we need both calls? - ;; Is find faster forwards than - ;; position is backwards? - (position #\newline (the simple-string thing) - :from-end t - :start start - :end end)))) + (let ((last-newline + (flet ((do-it (string) + (and (find #\newline string :start start :end end) + ;; FIXME why do we need both calls? + ;; Is find faster forwards than + ;; position is backwards? + (position #\newline string + :from-end t + :start start + :end end)))) + (declare (inline do-it)) + ;; Specialize the common cases + (etypecase thing + (simple-base-string + (do-it (the simple-base-string thing))) + #!+sb-unicode + ((simple-array character) + (do-it (the (simple-array character) thing))) + (string + (do-it thing)))))) (if (and (typep thing 'base-string) (eq (fd-stream-external-format stream) :latin-1)) (ecase (fd-stream-buffering stream) diff --git a/version.lisp-expr b/version.lisp-expr index 14139e9..6ee9836 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.9.6.6" +"0.9.6.7"