filmov
tv
Cython vs. Python - 3k times faster code! | Test

Показать описание
With this tutorial we will compare the performance betwen Cython and Python. Theoretically, Cython is much faster than Python. But how much? How we can to compare these two trending technologies? This video demonstrates how to write a simple function in Cython, and generate an executable Python file from it.
Cython is an intermediate step between Python and C/C++. It allows you to write pure Python code with some minor modifications, which is then translated directly into C code. In other words, The #Cython language is a superset (the extension of for Python) of the Python language that additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code.
The chapters of the video:
0:00 - What is Cython?
0:50 - Write a Python function to test
1:46 - Write a Cython function to test
5:41 - Test Cython function with a script
7:06 - Compare Python and Cython functions execution speed
All what we will use is standard Python, terminal and file explorer (Finder on Mac/Windows explorer on Windows).
Do not forget to install Cython on your machine with terminal command: pip install Cython
Some theory the video touched:
All the best and good luck with Cython & Python!
Subscribe the channel to get more fresh high-quality videos first! Thanks!
Your -Data Science Garage.
Cython is an intermediate step between Python and C/C++. It allows you to write pure Python code with some minor modifications, which is then translated directly into C code. In other words, The #Cython language is a superset (the extension of for Python) of the Python language that additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code.
The chapters of the video:
0:00 - What is Cython?
0:50 - Write a Python function to test
1:46 - Write a Cython function to test
5:41 - Test Cython function with a script
7:06 - Compare Python and Cython functions execution speed
All what we will use is standard Python, terminal and file explorer (Finder on Mac/Windows explorer on Windows).
Do not forget to install Cython on your machine with terminal command: pip install Cython
Some theory the video touched:
All the best and good luck with Cython & Python!
Subscribe the channel to get more fresh high-quality videos first! Thanks!
Your -Data Science Garage.
Комментарии