Merge pull request #727 from shahzadlone/master

Vector Optimize to Save on Re-Allocation costs.
This commit is contained in:
Alex Lin 2019-01-31 07:42:23 -06:00 committed by GitHub
commit 0ce0398823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -124,6 +124,8 @@ IterOverLogGroups::IterOverLogGroups( LogMultiGroup* lmg,
LogGroup* key ;
vector < int > val ;
map < LogGroup*, set< int > >::const_iterator ll;
listLogGroupIterators_.reserve(listLogGroupIterators_.size()
+ lg2log.size());
for (ll = lg2log.begin(); ll != lg2log.end(); ll++) {
key = (*ll).first ;

View File

@ -11,16 +11,16 @@
MemMgr::MemMgr() {
debugLevel = 0;
reducedCheckpoint = true;
reducedCheckpoint = true;
hexfloatCheckpoint = false;
compactArraysCheckpoint = true;
defaultCheckPointAgent = new ClassicChkPtAgent( std::cout );
defaultCheckPointAgent->setDebugLevel( debugLevel);
defaultCheckPointAgent->setReducedCheckpoint( reducedCheckpoint);
defaultCheckPointAgent->setHexfloatCheckpoint( hexfloatCheckpoint);
defaultCheckPointAgent->setMakeCompactArrays( compactArraysCheckpoint );
currentCheckPointAgent = defaultCheckPointAgent;
typeDictionary = new TypeDictionary();