From 39ce8835f7ad62b4bb697f0f152dd0eb94ae3f43 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Wed, 5 Aug 2015 22:32:02 +0200 Subject: [PATCH] gsdx:linux: use unordered hash It seems a bit faster on 'perf' tool --- plugins/GSdx/stdafx.h | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index eceec0ddf1..aa9bfe2c9f 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -115,6 +115,17 @@ using namespace std; #include +#if _MSC_VER >= 1800 || !defined(_WINDOWS) +#include +#include +#define hash_map unordered_map +#define hash_set unordered_set +#else +#include +#include +using namespace stdext; +#endif + #ifdef _WINDOWS // Note use GL/glcorearb.h on the future @@ -123,18 +134,6 @@ using namespace std; #include #include "GLLoader.h" - #if _MSC_VER >= 1800 - #include - #include - #define hash_map unordered_map - #define hash_set unordered_set - #else - #include - #include - using namespace stdext; - #endif - - // hashing algoritms at: http://www.cris.com/~Ttwang/tech/inthash.htm // default hash_compare does ldiv and other crazy stuff to reduce speed @@ -193,19 +192,11 @@ using namespace std; #else - #define hash_map map - #define hash_set set - - //#include - //#include - // Note use GL/glcorearb.h on the future #include #include #include "GLLoader.h" - //using namespace __gnu_cxx; - #define DIRECTORY_SEPARATOR '/' #endif