Author vstinner
Recipients ebfe, pitrou, vstinner
Date 2008-12-27.01:04:00
SpamBayes Score 1.33183e-05
Marked as misclassified No
Message-id <1230339845.8.0.60880428439.issue4751@psf.upfronthosting.co.za>
In-reply-to
Content
> I've taken on haypo's patch to release the GIL only 
> when the buffer is larger than 10kb

You can factorize the code by moving Py_BEGIN_ALLOW_THREADS / 
Py_END_ALLOW_THREADS *into* EVP_hash ;-)

10 KB is a random value or the fast value for your computer?

I wrote a small benchmark: md5sum.py, my Python multithreaded version 
of md5sum. Results on 129 files (between 7 and 10 MB) on an Intel Quad 
Core @ 2.5 GHz:
 - without the patch: best=10.6 sec / average ~= 11.5 sec
 - with the patch (version 3): best=7.7 sec / average ~= 8.5 sec

My program creates N threads for N files, which is maybe stupid (eg. 
limit to C+1 thread for C cores).
History
Date User Action Args
2008-12-27 01:04:07vstinnersetrecipients: + vstinner, pitrou, ebfe
2008-12-27 01:04:05vstinnersetmessageid: <1230339845.8.0.60880428439.issue4751@psf.upfronthosting.co.za>
2008-12-27 01:04:04vstinnerlinkissue4751 messages
2008-12-27 01:04:03vstinnercreate