We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea226c4 commit 45091faCopy full SHA for 45091fa
1 file changed
src/HttpParser.h
@@ -262,6 +262,27 @@ struct HttpParser {
262
}
263
264
static inline void *consumeFieldName(char *p) {
265
+ /* Best case fast path (particularly useful with clang) */
266
+ while (true) {
267
+ while ((*p >= 65) & (*p <= 90)) [[likely]] {
268
+ *p |= 32;
269
+ p++;
270
+ }
271
+ while (((*p >= 97) & (*p <= 122))) [[likely]] {
272
273
274
+ if (*p == ':') {
275
+ return (void *)p;
276
277
+ if (*p == '-') {
278
279
+ } else if (!((*p >= 65) & (*p <= 90))) {
280
+ /* Exit fast path parsing */
281
+ break;
282
283
284
+
285
+ /* Generic */
286
while (isFieldNameByteFastLowercased(*(unsigned char *)p)) {
287
p++;
288
0 commit comments