Perf: Use unordered_map instead of map in very slightly hot function.

Incrementing an unordered_map's iterator is a bit faster.
This commit is contained in:
comex 2013-09-19 02:40:29 -04:00
parent 1570558789
commit 390760bd75

View File

@ -4,7 +4,7 @@
// TODO: Handle cache-is-full condition :p
#include <map>
#include <unordered_map>
#include "Common.h"
#include "VideoCommon.h"
@ -216,7 +216,7 @@ inline u64 CreateVMapId(u32 VATUSED)
return vmap_id;
}
typedef std::map<u64, CachedDisplayList> DLMap;
typedef std::unordered_map<u64, CachedDisplayList> DLMap;
struct VDlist
{
@ -225,7 +225,7 @@ struct VDlist
u32 count;
};
typedef std::map<u64, VDlist> VDLMap;
typedef std::unordered_map<u64, VDlist> VDLMap;
static VDLMap dl_map;
static u8* dlcode_cache;