minetest / minetest

Minetest is an open source voxel game-creation platform with easy modding and game creation

Home Page:https://www.minetest.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace core::map with std::map

paradust7 opened this issue · comments

std::map can be expected to perform as well as any custom implementation, and likely much better.

This is to track the pull requests.

Don't forget about std::unordered_map. It's slightly better if it can be used.

@savilli
I essentially did just did a simple search/replace in this change.
std::map and core::map are semantically equivalent in that they use red-black trees, and operator<
std::unordered_map uses std::hash and operator==.

It would not have been safe to substitute unordered_map without investigating the semantics of each key types and the usage pattern.