From: Nikodemus S. <de...@us...> - 2007-12-12 11:58:51
|
Update of /cvsroot/sbcl/sbcl/src/code In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3252/src/code Modified Files: seq.lisp Log Message: 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. Index: seq.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/code/seq.lisp,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- seq.lisp 12 Dec 2007 11:22:38 -0000 1.82 +++ seq.lisp 12 Dec 2007 11:58:08 -0000 1.83 @@ -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))))))))) |