vert.x icon indicating copy to clipboard operation
vert.x copied to clipboard

Favour inlining on http header value validation and specialize it per sequence type

Open franz1981 opened this issue 2 years ago • 3 comments

This is addressing a small (relative) regression on header validation due to the improvement on Netty side. The previous comparison with Netty was at https://github.com/eclipse-vertx/vert.x/pull/4590#issuecomment-1385021782

Before:

Benchmark                              (asciiNames)  (validate)   Mode  Cnt     Score     Error   Units
HeadersSetBenchmark.vertxSmall                 true        true  thrpt   20  3522.025 ±  42.544  ops/ms
HeadersSetBenchmark.vertxSmall                false        true  thrpt   20  2709.417 ± 138.243  ops/ms

This PR:

Benchmark                              (asciiNames)  (validate)   Mode  Cnt     Score    Error   Units
HeadersSetBenchmark.vertxSmall                 true        true  thrpt   20  5247.075 ± 86.684  ops/ms
HeadersSetBenchmark.vertxSmall                false        true  thrpt   20  3575.735 ± 80.029  ops/ms

With this patch we're now back near to Netty validation (that's less complex then our)

franz1981 avatar Feb 22 '23 08:02 franz1981

we need a test for this

vietj avatar Feb 22 '23 12:02 vietj

Yep, let me add it :)

franz1981 avatar Feb 22 '23 14:02 franz1981

missing test :-)

vietj avatar Mar 01 '23 09:03 vietj