]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commit
Reset simplify and expression hashmaps when clearing.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 11 Apr 2009 08:25:49 +0000 (08:25 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Sat, 11 Apr 2009 08:25:49 +0000 (08:25 +0000)
commit5c05c30f0cd66304d1102393f9b71d462ae47c09
treeab580f0f0a2e04aac9648f1f6002e8ce83bd8576
parentf52b2a625dc241f318affaa88ed5e5d7bee597c6
Reset simplify and expression hashmaps when clearing.

If a hashmap got very big, some methods like clear would take a long time (using the hasmap that is linked to on my machine). The clear()
function traverses each of the buckets in the hashmap seeing whether it had children. If the hashmap previously had millions of elements, even if it
now contains just a single element, then there would still be millions of buckets. The clear() function would take much longer than it needed to.

These changes were inspired by testcase15.stp.smt. On my machine, this patch speeds up STP on that benchmark by 20 times.

git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@67 e59a4935-1847-0410-ae03-e826735625c1
AST/AST.cpp
AST/AST.h
parser/let-funcs.cpp
simplifier/simplifier.cpp