[PyPy-issue] [issue607] hashlib.sha1() is slow

Dan Villiom Podlaski Christiansen pypy-dev-issue at codespeak.net
Sat Dec 11 18:10:16 CET 2010


New submission from Dan Villiom Podlaski Christiansen <danchr at gmail.com>:

The SHA-1 implementation in PyPy is approximately three times as slow as the one in CPython:

$ python2.5 -m timeit -n 1000 -s 'import hashlib; buf = file("/dev/random").read(100000)' 
'hashlib.sha1(buf)'
1000 loops, best of 3: 360 usec per loop
$ pypy -m timeit -n 1000 -s 'import hashlib; buf = file("/dev/random").read(100000)' 
'hashlib.sha1(buf)'1000 loops, best of 3: 1.16 msec per loop

This may be part of the explanation of why 'hg verify' takes twice as long with PyPy as it does CPython. I 
used the pypy-c-jit-79964-osx64 nightly build.

----------
effort: ???
messages: 1987
nosy: danchr, pypy-issue
priority: bug
release: ???
status: unread
title: hashlib.sha1() is slow

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue607>
_______________________________________________________



More information about the Pypy-issue mailing list