From 6298db769e00670920b3d5d2e2dc5426f9d64786 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Wed, 12 Dec 2007 11:58:03 +0000 Subject: [PATCH] 1.0.12.29: optimize POSITION & FIND families for strings * If the string is simple, and the element type is know the old code does well already. Add a dispatch for (SIMPLE-ARRAY CHARACTER (*)) to the out-of-line versions on unicode builds. * To keep code size down to something reasonable, remove the dispatch for SIMPLE-VECTOR: presumably POSITION & FIND are much more common on strings of uncertain type, then random vectors. --- src/code/seq.lisp | 5 +++-- version.lisp-expr | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/code/seq.lisp b/src/code/seq.lisp index a51435d55..b49f616ae 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -2178,8 +2178,9 @@ (frob sequence t) (frob sequence nil)))) (typecase sequence - (simple-vector (frob2)) - (simple-base-string (frob2)) + #!+sb-unicode + ((simple-array character (*)) (frob2)) + ((simple-array base-char (*)) (frob2)) (t (vector*-frob sequence)))) (declare (type (or index null) p)) (values f (and p (the index (- p offset))))))))) diff --git a/version.lisp-expr b/version.lisp-expr index 1fc778eed..66e285dd1 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.12.28" +"1.0.12.29" -- 2.11.4.GIT