in csrc/suffix_decoding/int32_map.h [292:312]
void maybe_rehash_after_erase_() {
if (!slots_) {
return;
}
// If completely empty: free everything and return.
if (size_ == 0) {
delete[] slots_;
slots_ = nullptr;
cap_ = size_ = tombstones_ = 0;
return;
}
// If too sparse, shrink by 1/2.
if (static_cast<uint64_t>(size_) * 100 <
static_cast<uint64_t>(cap_) * MIN_LOAD_PCT) {
if (cap_ / 2 >= MIN_CAPACITY) {
rehash_(cap_ / 2);
}
}
}