)]}'
{
  "commit": "f46fc95b5d547993de1153d513d5e68561a363e1",
  "tree": "87bc9c76158b009959bc69f9c87570746a76c098",
  "parents": [
    "13962b9c7a23c0ecc67aff34fe4a0f8a32c17974"
  ],
  "author": {
    "name": "birenroy",
    "email": "birenroy@google.com",
    "time": "Tue Dec 01 14:58:55 2026 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Dec 01 14:59:28 2026 -0800"
  },
  "message": "Vectorizes `quiche::header_properties::HasInvalidHeaderChars`.\n\nPreviously, `HasInvalidHeaderChars` scanned each byte using an early-exit loop\nover a 256-entry `std::array\u003cbool, 256\u003e` lookup table (`IsInvalidHeaderChar`),\nwhich blocked LLVM auto-vectorization and consumed ~3,640 GCUs fleet-wide\n(`IsInvalidHeaderChar` consumed an additional ~192 GCUs).\n\nThis change replaces the lookup table with a branch-free `constexpr` predicate\n(`IsValidHeaderCharImpl`) and accumulates validity over `uint8_t` bytes using\nbitwise `\u0026\u003d`. With `-c opt`, Clang vectorizes `HasInvalidHeaderChars` at\n`vectorization width: 16, interleaved count: 4` with zero register spills.\n\nMicrobenchmark results on Broadwell (`//third_party/quiche/balsa:header_properties_benchmark`,\n`setarch x86_64 -R --benchmark_repetitions\u003d5 --benchmark_min_time\u003d0.5s`):\n\n- 16 B: 15.6 ns (984 MB/s) -\u003e 11.7 ns (1.32 GB/s)\n- 64 B: 56.0 ns (1.07 GB/s) -\u003e 12.0 ns (5.04 GB/s, 4.7x)\n- 256 B: 246 ns (1.01 GB/s) -\u003e 27.2 ns (8.93 GB/s, 9.0x)\n- 4096 B: 3,448 ns (1.11 GB/s) -\u003e 384 ns (9.95 GB/s, 9.0x)\n\nAlso adds exhaustive 256-byte and vector-boundary unit tests in\n`HeaderPropertiesTest` (verified in default and `-c dbg --config\u003dasan` modes)\nand a multi-size microbenchmark in\n`//third_party/quiche/balsa:header_properties_benchmark`.\n\nDeveloped with this skill: http://google3/experimental/users/birenroy/skills/vectorizing_cpp_strings/\n\nProtected by optimization with no functional change; not protected.\n\nPiperOrigin-RevId: 1033890867\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "57ffbc10ebcdedf7ea504c194a70be4a92bf4e64",
      "old_mode": 33188,
      "old_path": "quiche/balsa/header_properties.cc",
      "new_id": "42702b5351ecabfbb6a30097a6dc2f151a23d888",
      "new_mode": 33188,
      "new_path": "quiche/balsa/header_properties.cc"
    },
    {
      "type": "modify",
      "old_id": "f4e749a84b228815259f133903343d83467807d9",
      "old_mode": 33188,
      "old_path": "quiche/balsa/header_properties_test.cc",
      "new_id": "7d2b5c2fb14028fbb555dc95eefbf75a2c3ee47d",
      "new_mode": 33188,
      "new_path": "quiche/balsa/header_properties_test.cc"
    }
  ]
}
