mirror of https://github.com/PCSX2/pcsx2.git
Switch the GameDatabase from using a pxDictionary to a std::unordered_map.
Both implementations are about the same, which is hard to measure since we are limited in speed due to the hashing function. Both implementations averaged ~220ms to load the full game database on my workstation.
This commit is contained in:
parent
80b22ca2be
commit
2c6188b73f
|
@ -18,8 +18,8 @@
|
||||||
//#include "Common.h"
|
//#include "Common.h"
|
||||||
#include "AppConfig.h"
|
#include "AppConfig.h"
|
||||||
#include "Utilities/HashMap.h"
|
#include "Utilities/HashMap.h"
|
||||||
#include "Utilities/SafeArray.h"
|
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
#include <wx/wfstream.h>
|
#include <wx/wfstream.h>
|
||||||
|
|
||||||
struct key_pair;
|
struct key_pair;
|
||||||
|
@ -176,7 +176,7 @@ public:
|
||||||
virtual void updateGame(const Game_Data& game)=0;
|
virtual void updateGame(const Game_Data& game)=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef pxDictionary<Game_Data*,StringHashNoCase> GameDataHash;
|
typedef std::unordered_map<wxString, Game_Data*, StringHashNoCase> GameDataHash;
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
// BaseGameDatabaseImpl
|
// BaseGameDatabaseImpl
|
||||||
|
|
Loading…
Reference in New Issue