Antoine Pitrou <pit...@free.fr> added the comment: > SHA1 hashing (C) > > threads= 1: 1275 iterations/s. balance > threads= 2: 1267 ( 99%) 0.7238 > threads= 3: 1271 ( 99%) 0.2405 > threads= 4: 1270 ( 99%) 0.1508 > > Using the forced "do_yield" helps balance things, but not much. We > still have a .7 balance in SHA1 hashing for two threads.
Which is not unreasonable, since SHA1 releases the GIL. The unbalance would be produced by the Windows scheduler, not by Python. Note: "do_yield" is not meant to "balance" things as much as to make measurements meaningful at all. Without switching at all during say 2 seconds, the numbers become totally worthless. > If no one objects, I'd like to submit this changed ccbench.py to the trunk. Please let me take a look. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8299> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com