Commit 5f8a7b4
Improve request method parsing (#119)
Special-case parsing of the GET and POST request method as that is by far the
most common. Speeds up the req_short benchmark by a fair margin:
req_short/req_short time: [32.601 ns 32.737 ns 32.914 ns]
thrpt: [1.9241 GiB/s 1.9345 GiB/s 1.9425 GiB/s]
change:
time: [-4.1113% -3.5415% -3.0150%] (p = 0.00 < 0.05)
thrpt: [+3.1087% +3.6715% +4.2876%]
Performance has improved.
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>1 parent aa6108b commit 5f8a7b4
2 files changed
Lines changed: 42 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
25 | 39 | | |
26 | 40 | | |
27 | 41 | | |
| |||
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
65 | 89 | | |
66 | 90 | | |
67 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
482 | 497 | | |
483 | 498 | | |
484 | 499 | | |
| |||
0 commit comments