[issue37774] Micro-optimize vectorcall using PY_LIKELY

STINNER Victor report at bugs.python.org
Tue Aug 13 09:40:18 EDT 2019


STINNER Victor <vstinner at redhat.com> added the comment:

Another example to explain my concern. In the Linux kernel, list macros used to prefetch next items: “(...) So the conclusion is: prefetches are absolutely toxic, even if the NULL ones are excluded.”

https://lwn.net/Articles/444336/

The lesson is that we should not let developers tune the compiler: let the CPU do that for you :-) For example, CPUs have evolved heuristics to prefetch data for you.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37774>
_______________________________________


More information about the Python-bugs-list mailing list