Message47779
Logged In: YES
user_id=413
The 007 patch improves the speed of the constructor. There
is still a potential speed issue with the
constructor/destructor to work on:
greg@spiff src $ ./python Lib/test/test_hashlib_speed.py _sha
testing speed of old _sha legacy interface
0.06 seconds [20000 creations]
0.24 seconds [20000 "" digests]
0.15 seconds 20 x 106201 bytes [huge data]
0.15 seconds 200 x 10620 bytes [large data]
0.17 seconds 2000 x 1062 bytes [medium data]
0.35 seconds 20020 x 106 bytes [small data]
1.37 seconds 106200 x 20 bytes [digest_size data]
2.75 seconds 212400 x 10 bytes [tiny data]
greg@spiff src $ ./python Lib/test/test_hashlib_speed.py sha1
testing speed of hashlib.sha1 <built-in function openssl_sha1>
0.22 seconds [20000 creations]
0.57 seconds [20000 "" digests]
0.09 seconds 20 x 106201 bytes [huge data]
0.09 seconds 200 x 10620 bytes [large data]
0.15 seconds 2000 x 1062 bytes [medium data]
0.71 seconds 20020 x 106 bytes [small data]
3.39 seconds 106200 x 20 bytes [digest_size data]
6.70 seconds 212400 x 10 bytes [tiny data]
I suspect the cause is either or both of the shared openssl
library call overhead or the openssl EVP abstraction
interface. The speed results are very similar to the above
regardless of which digest is used (the above was a celeron
333mhz running linux).
|
|
Date |
User |
Action |
Args |
2007-08-23 15:41:50 | admin | link | issue1121611 messages |
2007-08-23 15:41:50 | admin | create | |
|