]> git.kaiwu.me - nginx.git/commit
QUIC: unroll and inline ngx_quic_varint_len()/ngx_quic_build_int().
authorSergey Kandaurov <pluknet@nginx.com>
Sat, 22 May 2021 15:40:45 +0000 (18:40 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Sat, 22 May 2021 15:40:45 +0000 (18:40 +0300)
commitf1378601010b8f2857ac7c043ec4ac6d534543bb
tree85c917a4c5a6c616c192c20bebba25f152ec858a
parent66f736391ea5d0bc459c3f389a8cbfbb36fa9c86
QUIC: unroll and inline ngx_quic_varint_len()/ngx_quic_build_int().

According to profiling, those two are among most frequently called,
so inlining is generally useful, and unrolling should help with it.
Further, this fixes undefined behaviour seen with invalid values.

Inspired by Yu Liu.
src/event/quic/ngx_event_quic_transport.c