p4c
p4c copied to clipboard
Replace boost::container::flat_map with absl::btree_map in P4Tools.
Yet another variant of #4667 and #4713 but a bit more conservative.
btree_map
is a memory-efficient variant of std::map
which does not require hashing. We can use it to replace boost::container::flat_map
in P4Tools.
Reason why I am splitting this PR out:
#4667 introduces some hash functions which are still too inefficient and needs improvement.
#4713 introduces a new data structure (flat_map) which should be reviewed separately.
The other two PRs will be rebased after this one is in.