p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Replace boost::container::flat_map with absl::btree_map in P4Tools.

Open fruffy opened this issue 7 months ago • 2 comments

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.

fruffy avatar Jul 01 '24 13:07 fruffy