New submission from Josh Rosenberg:

Kristjan wrote improved locking primitives in #15038 that use the new (in 
Vista) SRWLock and Condition Variable APIs. SRWLocks (used in exclusive mode 
only) replace Critical Sections, which is slower than SRWLock and provides no 
features we use that might justify it. Condition Variables replace Semaphores, 
where the former is user mode (cheap) and the latter kernel mode (expensive).

These changes remain disabled by default.

Given that CPython dropped support for pre-Vista OSes in 3.5, I propose 
enabling the faster locking primitives by default. The PR I'll submit leaves 
the condition variable emulation code in the source so it's available to people 
who might try to build XP/WS03 compatible code, it just tweaks the define so it 
defaults to using the Vista+ APIs.

Based on the numbers from #15038, we should expect to see a significant 
improvement in speed.

----------
components: Interpreter Core, Windows
messages: 289955
nosy: josh.r, kristjan.jonsson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Enable optimized locks on Windows
type: performance
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to