pybitcointools
pybitcointools copied to clipboard
Faster sha256 function
Calling hashlib.sha256 directly with the hexdigest() output is an order of magnitude faster.
Before change:
>>> timeit.timeit("import cryptos; cryptos.sha256('foo')", number=1000)
0.01851644799999974
After change:
>>> timeit.timeit("import cryptos; cryptos.sha256('foo')", number=1000)
0.0015009069999996072
trainerred151:master