Message 99815 - Python tracker (original) (raw)
And here is an experimental patch which enables the "priority requests" mechanism which was in the original new GIL patch. "Experimental" because it only enables them on a couple of socket methods (enough to affect the benchmarks).
Here are the UDP benchmark results (with 2 background threads):
- 2.x trunk (old GIL): 11.379 seconds (921515.168 bytes/sec)
- vanilla py3k (new GIL): 27.400 seconds (382689.529 bytes/sec)
- patched py3k (new GIL + priority requests): 1.828 seconds (5737130.676 bytes/sec)
And here's patched py3k with 8 background threads: 3.058 seconds (3429136.193 bytes/sec)
(benchmarks run on a 8-core Linux machine)