Perf: Put in a portable std::hash that works with the pool. This turns on the 10-15% perf gain.
This commit is contained in:
parent
96f4911351
commit
1056110c30
3 changed files with 31 additions and 13 deletions
|
|
@ -306,8 +306,7 @@ protected:
|
|||
TInputScanner* currentScanner;
|
||||
int numErrors; // number of compile-time errors encountered
|
||||
bool parsingBuiltins; // true if parsing built-in symbols/functions
|
||||
// need portable TStringHash TUnorderedMap<TString, TExtensionBehavior, TStringHash> extensionBehavior; // for each extension string, what its current behavior is set to
|
||||
TMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is set to
|
||||
TUnorderedMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is set to
|
||||
static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2 * 2)); // see computeSamplerTypeIndex()
|
||||
TPrecisionQualifier defaultSamplerPrecision[maxSamplerIndex];
|
||||
bool afterEOF;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,6 @@ public:
|
|||
};
|
||||
|
||||
MemoryPool *pool;
|
||||
// need portable hash typedef TUnorderedMap<int, Symbol*> TSymbolMap;
|
||||
typedef TMap<int, Symbol*> TSymbolMap;
|
||||
TSymbolMap symbols; // this has light use... just defined macros
|
||||
|
||||
|
|
@ -437,8 +436,7 @@ protected:
|
|||
//
|
||||
// From PpAtom.cpp
|
||||
//
|
||||
// need portable TStringHash typedef TUnorderedMap<const TString, int, TStringHash> TAtomMap;
|
||||
typedef TMap<const TString, int> TAtomMap;
|
||||
typedef TUnorderedMap<TString, int> TAtomMap;
|
||||
typedef TVector<const TString*> TStringMap;
|
||||
TAtomMap atomMap;
|
||||
TStringMap stringMap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue