cloud9_root/src/third_party/stp/src/simplifier/simplifier.cpp
// in ext/hash_map, and tr/unordered_map, there is no provision to
// shrink down the number of buckets in a hash map. If the hash_map
// has previously held a lot of data, then it will have a lot of
// buckets. Slowing down iterators and clears() in particular.
in ext/hash_map, and tr/unordered_map, there is no provision to
shrink down the number of buckets in a hash map. If the hash_map
has previously held a lot of data, then it will have a lot of
buckets. Slowing down iterators and clears() in particular.
in ext / hash_map and tr / unordered_map there is no provision to shrink down the number of buckets in a hash map . If the hash_map has previously held a lot of data then it will have a lot of buckets . Slowing down iterators and clears () in particular .
void
  Simplifier::ResetSimplifyMaps()
  {
    delete SimplifyMap;
    SimplifyMap = new ASTNodeMap(INITIAL_TABLE_SIZE);
    delete SimplifyNegMap;
    SimplifyNegMap = new ASTNodeMap(INITIAL_TABLE_SIZE);
  }
void Simplifier :: ResetSimplifyMaps ( ) { delete SimplifyMap ; SimplifyMap = new ASTNodeMap ( INITIAL_TABLE_SIZE ) ; delete SimplifyNegMap ; SimplifyNegMap = new ASTNodeMap ( INITIAL_TABLE_SIZE ) ; }
in ext/hash_map, and tr/unordered_map, there is no provision to
shrink down the number of buckets in a hash map.
in ext / hash_map and tr / unordered_map there is no provision to shrink down the number of buckets in a hash map .
// clear() is extremely expensive for hash_maps with a lot of // buckets, in the EXT_MAP implementation it visits every bucket, // checking whether each bucket is empty or not, if non-empty it // deletes the contents.  The destructor seems to clear everything // anyway. //SimplifyMap->clear(); //SimplifyNegMap->clear();