pybitcointools icon indicating copy to clipboard operation
pybitcointools copied to clipboard

Faster sha256 function

Open TrainerRed151 opened this issue 1 year ago • 1 comments

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 avatar Apr 01 '24 22:04 TrainerRed151

trainerred151:master

char23-web avatar Sep 23 '25 18:09 char23-web