When calling CombineSignatures and VerifyScript inside signrawtransaction with a CMutableTransaction, the tx is converted into a CTransaction which requires hashing.
Because both CombineSignatures and VerifyScript accept the scriptSig created by SignSignature separately from the transaction we can instead convert the mutable tx to CTransaction once and use that one.
Results: 1000 inputs, 75kB before signing: 2.86s vs. 4.88s Signature concatenation of three 250kB transactions with 1000 inputs: 8.638s vs. 19.142s
There still remains some unnecessary hashing, but fixing this requires a larger refactor: SignSignature requires a CMutableTransaction because it changes the scriptSig in place. But it also immediately creates a CTransaction (costly) for a TransactionSignatureChecker. Using a MutableTransactionSignatureChecker is not an option because it immediately converts the mutable transaction to a CTransaction. Instead, the TransactionSignatureChecker should be able to deal with CMutableTransaction without rehashing.