Make HTTP message parsing a little faster

ParseHttpMessage() now does a better job avoiding malloc() calls and
headers commonly sent by CloudFlare can now be consulted in constant
time using our hard-coded perfect hash table.  This increases /claim
performance from 321k to 337k qps which is 5% faster.
This commit is contained in:
Justine Tunney 2022-10-04 06:33:10 -07:00
parent 726f04e8aa
commit 9f9b240f3d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
5 changed files with 209 additions and 166 deletions

View file

@ -94,7 +94,13 @@ Accept-Ranges, kHttpAcceptRanges
Set-Cookie, kHttpSetCookie
Sec-CH-UA, kHttpSecChUa
Sec-CH-UA-Mobile, kHttpSecChUaMobile
Sec-CH-UA-Platform, kHttpSecChUaPlatform
Sec-Fetch-Site, kHttpSecFetchSite
Sec-Fetch-Mode, kHttpSecFetchMode
Sec-Fetch-User, kHttpSecFetchUser
Sec-Fetch-Dest, kHttpSecFetchDest
CF-RAY, kHttpCfRay
CF-Visitor, kHttpCfVisitor
CF-Connecting-IP, kHttpCfConnectingIp
CF-IPCountry, kHttpCfIpcountry
CDN-Loop, kHttpCdnLoop