commit | c42c245a616eb265e27f44651edad17947e7ddf3 | [log] [tgz] |
---|---|---|
author | martinduke <martinduke@google.com> | Thu Apr 24 08:19:16 2025 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Apr 24 08:20:12 2025 -0700 |
tree | be0b4c9795c3d2cffc2e703211caa68b5fc919fe | |
parent | 91b3e2c01b17bdaf989e44b3e971bbd5a4fdb215 [diff] |
Eliminate heap allocations from initial obfuscator generation in QUICHE. Each crypter still invokes 16 malloc operations due to OpenSSL HKDF libraries. When creating initial obfuscators, the Crypters themselves are allocated from the heap, but all operations to populate those crypters are conducted entirely on the stack. Additional #includes in *_session fix compiler failures in the benchmark test. Result of benchmark run: blaze run -c opt --dynamic_mode=off --copt=-gmlt third_party/quic/core/crypto/crypto_utils_benchmark -- --benchmark_filter=all CPU: Intel Icelake with HyperThreading (24 cores) dL1:48KB dL2:1280KB dL3:54MB Benchmark Time(ns) CPU(ns) Iterations ----------------------------------------------------------------------------- BM_InitialObfuscators 6506 6583 7290 BM_InitialObfuscators 6507 6583 7292 BM_InitialObfuscators 6497 6588 7285 BM_InitialObfuscators 6525 6585 7296 BM_InitialObfuscators 6527 6587 7282 BM_InitialObfuscators 6514 6579 7306 BM_InitialObfuscators 6504 6616 7260 BM_InitialObfuscators 6482 6584 7299 BM_InitialObfuscators 6488 6589 7286 BM_InitialObfuscators 6489 6042 7291 BM_InitialObfuscators 6533 6592 7290 BM_InitialObfuscators 6563 6799 10000 BM_InitialObfuscators_mean 6513 6568 90177 BM_InitialObfuscators_stddev 23.5 169 90177 BM_InitialObfuscatorsNoMalloc 6267 6414 10000 BM_InitialObfuscatorsNoMalloc 6316 6405 10000 BM_InitialObfuscatorsNoMalloc 6251 6050 7286 BM_InitialObfuscatorsNoMalloc 6250 6405 10000 BM_InitialObfuscatorsNoMalloc 6266 6045 7294 BM_InitialObfuscatorsNoMalloc 6262 6039 7286 BM_InitialObfuscatorsNoMalloc 6250 6028 7300 BM_InitialObfuscatorsNoMalloc 6232 6040 7292 BM_InitialObfuscatorsNoMalloc 6250 6457 10000 BM_InitialObfuscatorsNoMalloc 6230 6409 10000 BM_InitialObfuscatorsNoMalloc 6243 6405 10000 BM_InitialObfuscatorsNoMalloc 6248 6069 7259 BM_InitialObfuscatorsNoMalloc_mean 6256 6260 103717 BM_InitialObfuscatorsNoMalloc_stddev 22.4 184 103717 Protected by FLAGS_quic_reloadable_flag_quic_heapless_obfuscator. PiperOrigin-RevId: 751001626
QUICHE stands for QUIC, Http, Etc. It is Google‘s production-ready implementation of QUIC, HTTP/2, HTTP/3, and related protocols and tools. It powers Google’s servers, Chromium, Envoy, and other projects. It is actively developed and maintained.
There are two public QUICHE repositories. Either one may be used by embedders, as they are automatically kept in sync:
To embed QUICHE in your project, platform APIs need to be implemented and build files need to be created. Note that it is on the QUICHE team's roadmap to include default implementation for all platform APIs and to open-source build files. In the meanwhile, take a look at open source embedders like Chromium and Envoy to get started:
To contribute to QUICHE, follow instructions at CONTRIBUTING.md.
QUICHE is only supported on little-endian platforms.