As mentioned in the discussion with Vladislav today, this map can become unordered.
Details
- Reviewers
- None
Test the performance, for example with the CChart.cpp diff.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 9213 Build 15164: Vulcan Build Jenkins Build 15163: Vulcan Build (Windows) Jenkins Build 15162: arc lint + arc unit
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/69/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/gui/IGUIObject.h | 44| template·<typename·T>·class·GUI; | | [MAJOR] CPPCheckBear (syntaxError): | | Code 'template<...' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/578/display/redirect
According to Vladislavs tests, unordered_map is slower.
http://irclogs.wildfiregames.com/2019-09/2019-09-04-QuakeNet-%230ad-dev.log
12:52 < Vladislav> elexis: unordered_map is slower for me, 1.2ms vs 0.9ms (map)
This patch was used by Vladislav to measure:
Well it makes sense to use an ordered map, because it allows for logarithmic instead of linear lookup time.
https://en.cppreference.com/w/cpp/container/unordered_map/operator_at
https://en.cppreference.com/w/cpp/container/map/operator_at