Improve http2::HuffmanEncodeFast() by skipping rest of iteration if possible.

While I originally thought that a loop without branches results in fastest
encoding, benchmarks show that skipping to the next iteration if the Huffman
code has ended actually speeds up encoding.  This is probably due to the fact
that most codes are short (by design of the Huffman code).

Of course this encoding algorithm would be a lot simpler if it was only for
64-bit big endian platforms, as a single |= instruction would do the job.

PiperOrigin-RevId: 335634321
Change-Id: Ia95c52b15c3d50600e40cd0beef914773bf2c068
1 file changed
tree: 418d8640bd12c56f0a1014000c43ed09f554b60f
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.