Files
carbon-lang/toolchain/base
Chandler Carruthandjosh11b 4c5734a8cc Make tag application and removal a compile time property (#8042)
For stores with untagged ID types, `Apply` and `Remove` still did (some)
of the work, despite the fact that it could never be needed. Because
both depend on runtime parts of the class, we need to explicitly check
whether the store's IDs are tagged at compile time with `if constexpr`.

This is important because the hottest value stores aren't tagged, and we
get significant performance uplift in lexing and parsing.

Benchmark results (./scripts/bench_runner.py --runs=12,
-march=x86-64-v3):
- BM_CompileApiFileDenseDecls<Lang::Carbon, Phase::Lex>/65536: CPU Time:
-4.713%
- BM_CompileApiFileDenseDecls<Lang::Carbon, Phase::Parse>/65536: CPU
Time: -7.251%
- BM_CompileImplFile<Lang::Carbon, Phase::Lex>/65536: CPU Time: -8.016%
- BM_CompileImplFile<Lang::Carbon, Phase::Parse>/65536: CPU Time:
-9.477%

Assisted-by: Antigravity with various models

---------

Co-authored-by: josh11b <15258583+josh11b@users.noreply.github.com>
2026-10-26 23:39:35 +00:00
..
2026-09-29 03:32:33 +00:00
2026-06-29 21:11:16 +00:00