Message78328
Here is another simple benchmarker. For me it shows almost perfect
scaling (2 cores = 196% performance) if the buffer put into .update() is
large enough.
I deliberately did not move Py_BEGIN_ALLOW_THREADS into EVP_hash as we
might call this function without having some lock on the input buffer.
The 10kb limit was based on my own computer (MacBook Pro 2x2.5GHz) and
is somewhat more-safe-than-sorry.
Hashing is *very* fast on modern CPUs and working on many small strings
becomes very inefficient when releasing the GIL all the time. Just try
to hash 10240 bytes vs. 10241 bytes. |
|
Date |
User |
Action |
Args |
2008-12-27 01:36:46 | ebfe | set | recipients:
+ ebfe, pitrou, vstinner |
2008-12-27 01:36:46 | ebfe | set | messageid: <1230341806.45.0.208344921281.issue4751@psf.upfronthosting.co.za> |
2008-12-27 01:36:45 | ebfe | link | issue4751 messages |
2008-12-27 01:36:45 | ebfe | create | |
|