On 2019-07-11 07:19, Steve Dower wrote:
Did we try it and see if there's an actual performance benefit?
For _PyObject_CallOneArg(), I benchmarked __missing__ (with GCC) and it improved performance: https://bugs.python.org/issue37483#msg347217
I would also appreciate if we included more than just gcc as the benchmark for "what compilers do". Adding clang would satisfy me, though of course I'd be happiest if MSVC was also tested.
Some days ago I tested C varargs functions in general and Clang was worse than GCC. I haven't tested MSVC.
In general, I prefer to not expand even the internal C API unless there's a significant benefit, and the burden of proof is on those who are proposing the expansion.
What's "significant"? This is really hard to define, something that is significant for one use case may be completely irrelevant for another use case.