Move signature cache from CKey::Verify to CheckSig in script.cpp
authorGavin Andresen <gavinandresen@gmail.com>
Tue, 22 May 2012 17:56:14 +0000 (13:56 -0400)
committerGavin Andresen <gavinandresen@gmail.com>
Tue, 19 Jun 2012 19:36:34 +0000 (15:36 -0400)
commitfcbeaff8d049e414284631989b950e56b909525c
treea2b6d9714e3eba59a685d20112c48f67b7d82982
parent414e0407df38ccde3f20aac874005aec714299d0
Move signature cache from CKey::Verify to CheckSig in script.cpp

More than doubles the speed of verifying already-cached signatures
that use compressed pubkeys:
Before: ~200 microseconds
After:  ~80 microseconds
(no caching at all: ~3,300 microseconds per signature)

Also encapsulates the signature cache code in a class
and fixes a signed/unsigned comparison warning.
src/key.cpp
src/script.cpp