ooxi / violetland

An open source cross-platform game similar to Crimsonland
https://violetland.github.io/
Other
66 stars 15 forks source link

Use std::unordered_map instead of std::map #88

Open ooxi opened 8 years ago

ooxi commented 8 years ago

Especially in the lifeform lookup code an std::unordered_map could yield performance advantages. Not entirely sure whether or not being ordered is implicitly used somewhere.

Nevertheless most of the time playerId is looked up. Since it was inserted first, there could even be a performance decrease if swapping map to unordered_map.