From 390760bd75036e1b5d8acd96e8dc7bd859344658 Mon Sep 17 00:00:00 2001 From: comex Date: Thu, 19 Sep 2013 02:40:29 -0400 Subject: [PATCH] Perf: Use unordered_map instead of map in very slightly hot function. Incrementing an unordered_map's iterator is a bit faster. --- Source/Core/VideoCommon/Src/x64DLCache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/Src/x64DLCache.cpp b/Source/Core/VideoCommon/Src/x64DLCache.cpp index b412c2e274..7c59a3a072 100644 --- a/Source/Core/VideoCommon/Src/x64DLCache.cpp +++ b/Source/Core/VideoCommon/Src/x64DLCache.cpp @@ -4,7 +4,7 @@ // TODO: Handle cache-is-full condition :p -#include +#include #include "Common.h" #include "VideoCommon.h" @@ -216,7 +216,7 @@ inline u64 CreateVMapId(u32 VATUSED) return vmap_id; } -typedef std::map DLMap; +typedef std::unordered_map DLMap; struct VDlist { @@ -225,7 +225,7 @@ struct VDlist u32 count; }; -typedef std::map VDLMap; +typedef std::unordered_map VDLMap; static VDLMap dl_map; static u8* dlcode_cache;