Repository navigation
Commit 5621f29
authored
charset: stop checking for ascii if utf8 is satisfied (#768)
Since ascii is a subset of utf8, we don't need to iterate over input
bytes twice. Just checking once that the content if valid utf8 is
enough.
FromPlain-4 145.15n ± 2% 36.52n ± 6% -74.84% (p=0.002 n=6)1 parent eb8d3f4 commit 5621f29
1 file changed
Lines changed: 1 addition & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 87 | | |
99 | | - | |
| 88 | + | |
100 | 89 | | |
101 | 90 | | |
102 | 91 | | |
| |||
123 | 112 | | |
124 | 113 | | |
125 | 114 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | 115 | | |
136 | 116 | | |
137 | 117 | | |
| |||
0 commit comments