python-hdwallet icon indicating copy to clipboard operation
python-hdwallet copied to clipboard

Performance Degradation from 0.2.0 to 1.1.0

Open csek06 opened this issue 3 years ago • 0 comments

I've been using this wallet to generate vanity public addresses and have found a degradation in performance from version 0.2.0 to 1.1.0

Steps to reproduce generate a list of 1,000 mnemomics (not using this wallet for) convert those mnemonics to public addresses via below methods

hdwallet: HDWallet = HDWallet(cryptocurrency=EthereumMainnet)
def getAddress(seed, path):
	hdwallet.clean_derivation()
	hdwallet.from_mnemonic(mnemonic=seed)
	hdwallet.from_path(path)
	address = str(hdwallet.address()).strip()
	return address

you will see that just by going from version 0.2.0 to 1.1.0 it's about 33% slower

Note - I did change the import statement to the newer version to make the code work...

from hdwallet.derivations import BIP44Derivation
hdwallet: BIP44HDWallet = BIP44HDWallet(cryptocurrency=EthereumMainnet)

csek06 avatar Apr 23 '21 20:04 csek06