auto: rm std::map::StdMap trait, rename std::map to std::oldmap and start transition to the core::container::Map API #4746
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The rationale for renaming is that there isn't any reason to prefer
std::map
(not sendable, legacy API, and slower) overcore::hashmap::linear
, and it makes it obvious that the module in core is the one to use. Migrating tocore::hashmap
will take a fair bit of a work, but in most cases it should be as simple as marking the variable as mutable and replacing a few copies with borrowed pointers.Any future hash table implementations will implement the
core::container::Map
trait so migrating between them will be simple. My plan is to incrementally turn the old map into an ownedcore::hashmap::chained
container. It may or not be a useful container worth keeping around, but it's too hard to migrate right toLinearMap
everywhere at once.Here are the current benchmarks: