http: improve performance for incoming headers
This improves the performance of matchKnownFields
. This function is heavily used when parsing incoming http headers.
Here is the benchmark result:
confidence improvement accuracy (*) (**) (***)
http/incoming_headers.js headerDuplicates=0 c=50 benchmarker='autocannon' 0.53 % ±3.11% ±4.16% ±5.44%
http/incoming_headers.js headerDuplicates=0 c=500 benchmarker='autocannon' 2.16 % ±3.69% ±4.95% ±6.50%
http/incoming_headers.js headerDuplicates=20 c=50 benchmarker='autocannon' *** 19.92 % ±3.53% ±4.69% ±6.12%
http/incoming_headers.js headerDuplicates=20 c=500 benchmarker='autocannon' *** 16.96 % ±3.89% ±5.18% ±6.74%
http/incoming_headers.js headerDuplicates=5 c=50 benchmarker='autocannon' *** 10.68 % ±3.57% ±4.76% ±6.19%
http/incoming_headers.js headerDuplicates=5 c=500 benchmarker='autocannon' * 6.26 % ±4.86% ±6.47% ±8.42%
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines