Le mar. 27 nov. 2018 à 01:13, Larry Hastings email@example.com a écrit :
(...) I'm not convinced the nice-to-have of "you can't dereference the pointer anymore" is worth this runtime overhead.
About the general idea of a new C API.
If you only look at CPython in release mode, there is no benefit. But you should consider the overall picture:
* ability to distribute a single binary for CPython in release mode, CPython in debug mode, PyPy, and maybe some new more funky Python runtimes * better performance on PyPy
The question is if we can implement new optimizations in CPython (like tagged pointer) which would move the overall performance impact to at least "not significant" (not slower, not faster), or maybe even to "faster".
Note: Again, in my plan, the new C API would be an opt-in API. The old C API would remain unchanged and fully supported. So there is no impact on performance if you consider to use the old C API.