New submission from Larry Hastings: Right now the atomic access fence macros in pyatomic.h are unconditional. This means that they're active even even when you "./configure --without-threads". If Python thread support is disabled, surely we don't need to ensure atomic access to variables, because there aren't any other threads to compete with.
Shouldn't we add #ifdef WITH_THREAD /* current code goes here */ #else #define _Py_atomic_load_relaxed(x) (x) /* etc */ #endif ? ---------- messages: 263537 nosy: haypo, jyasskin, larry priority: low severity: normal stage: test needed status: open title: Elide Py_atomic fences when WITH_THREAD is disabled? type: performance versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26774> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com