Page MenuHomeWildfire Games

Use std::unordered_map for IGUIObject m_Settings
Changes PlannedPublic

Authored by elexis on Wed, Sep 4, 2:33 PM.

Details

Reviewers
None
Summary

As mentioned in the discussion with Vladislav today, this map can become unordered.

Test Plan

Test the performance, for example with the CChart.cpp diff.

Event Timeline

elexis created this revision.Wed, Sep 4, 2:33 PM
Vulcan added a comment.Wed, Sep 4, 2:35 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/69/display/redirect

Vulcan added a comment.Wed, Sep 4, 2:43 PM

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

elexis planned changes to this revision.Wed, Sep 4, 5:31 PM

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: