A `rustc_data_structures::sorted_map::SortedMap` might be a good fit for storing bodies and attributes in HIR. This would need to be measured. _Originally posted by @michaelwoerister in https://github.com/rust-lang/rust/pull/89124#discussion_r725879201_