Commit 880803a
committed
Use fast conversion filters to implement php_mb_ord
Even for single-character strings, this is about 50% faster for
ASCII, UTF-8, and UTF-16. For long strings, the performance gain is
enormous, since the old code would convert the ENTIRE string, just
to pick out the first codepoint.1 parent 9468fa7 commit 880803a
2 files changed
+13
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3993 | 3993 | | |
3994 | 3994 | | |
3995 | 3995 | | |
3996 | | - | |
3997 | | - | |
3998 | | - | |
3999 | | - | |
4000 | | - | |
4001 | | - | |
4002 | | - | |
4003 | | - | |
4004 | | - | |
4005 | | - | |
4006 | | - | |
4007 | | - | |
4008 | | - | |
4009 | | - | |
4010 | | - | |
4011 | | - | |
4012 | | - | |
4013 | | - | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
4014 | 4002 | | |
4015 | | - | |
4016 | | - | |
4017 | | - | |
| 4003 | + | |
| 4004 | + | |
4018 | 4005 | | |
| 4006 | + | |
4019 | 4007 | | |
4020 | 4008 | | |
4021 | 4009 | | |
| |||
0 commit comments