dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f530ba
)
Optimization on cleanUp(): roughly 1/3 speed boost on ascii-dominant but not ascii...
author
Brion Vibber
<brion@users.mediawiki.org>
Thu, 4 Nov 2004 23:53:44 +0000
(23:53 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Thu, 4 Nov 2004 23:53:44 +0000
(23:53 +0000)
includes/normal/UtfNormal.php
patch
|
blob
|
history
diff --git
a/includes/normal/UtfNormal.php
b/includes/normal/UtfNormal.php
index
08bc17b
..
0737823
100644
(file)
--- a/
includes/normal/UtfNormal.php
+++ b/
includes/normal/UtfNormal.php
@@
-346,7
+346,15
@@
class UtfNormal {
}
if( $n < 0x80 ) {
# Friendly ASCII chars.
+ # We can speed things up a bit for latin-based scripts
+ # where they tend to come in groups:
$out .= $c;
+ $i++;
+ while( $i < $len && ( $c = $string{$i} ) < "\x80" ) {
+ $out .= $c;
+ $i++;
+ }
+ $i--;
} elseif( $n < 0xc0 ) {
# illegal tail bytes or head byte of overlong sequence
if( $head == 0 ) {