I have this perf report from a node that handles a lot of sendtoaddress calls:
- 15.17% CWalletTx::GetSpendSize (inlined)
- 15.13% CalculateMaximumSignedInputSize
- 15.09% CWallet::DummySignInput (inlined)
- 15.04% ProduceSignature
- 14.34% SignStep
- 13.61% GetPubKey (inlined)
- CWallet::GetPubKey
- 13.60% FillableSigningProvider::GetPubKey
- 13.23% CKey::GetPubKey
- 13.17% secp256k1_ec_pubkey_create
- 10.71% secp256k1_ecmult_gen
+ 8.75% secp256k1_gej_add_ge
+ 1.54% secp256k1_ge_storage_cmov (inlined)
Is there something I can do to optimize it or cache the results? Most transactions running through my system are pretty similar.
I don't really care about the fees. I doubt that there's a significant difference in fees between 65 and 72 bytes. Is 72 really the maximum maximum? Maybe in the mean time I'll just hard-code it to that.