Cython 3.0: Compiling Python to C, the next generation

preview_player
Показать описание
The Cython project compiles Python to C -- not just to make code faster, but also to wrap external C libraries easily, and make it easy to write C extensions for Python generally. Cython 3.0 is a major overhaul of the project. Learn in this video what's new about it, why it's worth upgrading your Cython code to use its features, and some pitfalls to avoid along the way.

I talk more about the basics of Cython here:

More here about the CPython limited API, and other future changes to CPython:

------------------------------­----
Рекомендации по теме
Комментарии
Автор

Cython 3.0 release caused so much python packages to crash lately 😆 I NEED to get use to write cython alongside with my python code

luabida
Автор

Great video. Why not to make a tutorial series for Cython?

mfatihaydogdu
Автор

Hello, I just learned about Cython and I have a question. I want to package the Cython program into an .exe file to run on the Win10 operating system. I tried to do it with Pyinstaller like I did with the previous versions. Python files but without success. Looking forward to receiving an answer from you. Thank you very much.

nikolatrinh
Автор

is there a way to get pytorch models through onnx or another medium to perform inference fast with cython code? for example if your game of like code was instead a simulation of some sort where predictions would need to be made from a neural network?

zimrihidaf
Автор

hi Serdar, great video you got here!
A quick question: should we expect a lot of differences in execution speed between running Cython vs the pure python mode? I just did a quick test in Google Colab and the pure python implementation is like twice slower than Cython's speed.

Is this to be expected or something's wrong with my workflow?

pietraderdetective
Автор

One thing that has always restricted me to use cython was no proper way of handling matrices or strings as input to c functions. I wanted to input a matrix of strings into cython, and could not find a proper documentation

blueman
Автор

.pxd file? I'll have to check it out.

SHONNER