Closed chandlerc closed 2 months ago
Ping? Just looking for confirmation that moving the comment out-of-line to a separate area and cleaning up things was enough that this LG for landing.
I believe we'd discussed this in person a couple weeks ago, I'm fine with you merging.
This uses a heuristic reserve to greatly reduce hashtable growth of the identifiers hashtable. The design of the hashtable itself is optimized around compact memory use and is especially slow to grow and so this has an outsized impact.
The heuristic was computed using
scripts/source_stats.py
and looking at C++ codebases. We may want to periodically re-evaluate it as Carbon code emerges and we have better data on its distributions of tokens.This also required fixing the
Reserve
method onCanonicalValueStore
that wasn't actually used anywhere and so didn't even compile correctly. I added it to the relevant unit test so it is at least compiled locally to its definition.