Hi, I'm using Cython to develop a library which makes a lot of conversions from and to Python objects (i.e. I receive a list in input, create a typed memory view from it, do some calculations, and reconvert back to a list). Sometimes I get good speed-up even with the conversions overhead, but other times I get "only" something like 1.5x (in respect to 3.10). My understanding of Cython and Python internals is quite limited, but from what I understand:
- in 3.11 Python specialized the bytecode, and this specializations should go forward in 3.12;
-Â Cython doesn't use the bytecode, but talks directly to the python/C api, so it shouldn't benefit from bytecode optimizations;
I don't know if it is possible to do a prediction about this but I'd like to ask if the Python/C API will be targeted as something to optimize in next releases? (will the JIT compiler that maybe will be introduced improve also the Python/C api?)
This is relevant to me because the conversions costs a lot in my case, so if they ended-up slower in next releases in comparison to use Python directly, maybe I should change my optimization plan. Can something be said on this topic?
------------------------
Indirizzo istituzionale di posta elettronica degli studenti e dei laureati dell'UniversitĂ di TorinoOfficial University of Turin email address for students and graduatesÂ