Commit 1a0d63e
committed
[flang][runtime] Use dumber but faster check for list-directed repetition
When scanning list-directed input for nulls and repetition counts,
the current library depends on having each record be prescanned for
the presence of asterisk characters. It turns out that the overhead
of calling memchr(...,'*',...) on each record doesn't pay off, especially
on systems without SIMD-vectorized memchr implementations -- even on those,
it's faster (about 10%) to just scan ahead for asterisks when decimal
digits are encountered. Only when an asterisk is present, which is
not common, should we then bother to convert the digits to their integer
value.1 parent 507f394 commit 1a0d63e
File tree
2 files changed
+18
-12
lines changed- flang-rt
- include/flang-rt/runtime
- lib/runtime
2 files changed
+18
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 152 | + | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
| |||
168 | 166 | | |
169 | 167 | | |
170 | 168 | | |
171 | | - | |
172 | 169 | | |
173 | 170 | | |
174 | 171 | | |
| |||
181 | 178 | | |
182 | 179 | | |
183 | 180 | | |
184 | | - | |
185 | 181 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
195 | 202 | | |
196 | | - | |
197 | 203 | | |
198 | 204 | | |
199 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
908 | | - | |
909 | | - | |
| 908 | + | |
| 909 | + | |
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| |||
0 commit comments