filmov
tv
Call a C API from Python becomes more enjoyable with CFFI
Показать описание
"Call a C API from Python becomes more enjoyable with CFFI
[EuroPython 2017 - Talk - 2017-07-12 - Anfiteatro 2]
[Rimini, Italy]
Python is slow ! Python can’t access bare metal!
You often hear theses assumptions? Theses limitations can be surpassed by Python extensions written in C. However, according to my personal experience, doing this by leveraging C may yield to several issues (e.g., memory management).
C Foreign Function Interface for Python (a.k.a., CFFI) allows you to easily write Python extensions. One of the main aims of CFFI is to to wrap C libraries. Along the same lines, it may also be used for performance enhancement.
Next we are going to the next level, let’s wrap all the Vulkan API! Vulkan is the new 3D API and is not a piece of cake. To see the real advantage of CFFI, a side by side comparison between two Python modules is going to be presented:
CVulkan is a Vulkan wrapper written fully in C, it’s a classic C extension for Python
vulkan is its CFFI counterpart without any C written, only Python
I have developed two versions of Vulkan wrapper (one in a pure C, and the second by leveraging CFFI) and I can assure you that CFFI is a a way better!
Let’s code!
[EuroPython 2017 - Talk - 2017-07-12 - Anfiteatro 2]
[Rimini, Italy]
Python is slow ! Python can’t access bare metal!
You often hear theses assumptions? Theses limitations can be surpassed by Python extensions written in C. However, according to my personal experience, doing this by leveraging C may yield to several issues (e.g., memory management).
C Foreign Function Interface for Python (a.k.a., CFFI) allows you to easily write Python extensions. One of the main aims of CFFI is to to wrap C libraries. Along the same lines, it may also be used for performance enhancement.
Next we are going to the next level, let’s wrap all the Vulkan API! Vulkan is the new 3D API and is not a piece of cake. To see the real advantage of CFFI, a side by side comparison between two Python modules is going to be presented:
CVulkan is a Vulkan wrapper written fully in C, it’s a classic C extension for Python
vulkan is its CFFI counterpart without any C written, only Python
I have developed two versions of Vulkan wrapper (one in a pure C, and the second by leveraging CFFI) and I can assure you that CFFI is a a way better!
Let’s code!
Call a C API from Python becomes more enjoyable with CFFI
Call a C API from Python becomes more enjoyable with CFFI
How to program with Assembly language (calling a function from C)
Function Basics | C Programming Tutorial
How to CALL POST API in C#! - THIS EASY!
PyParis 2017 - Call a C API from Python becomes more enjoyable with CFFI by JS Bevilacqua
The write system call function in C
Using the C Caller Block to Call a C Function with a Global Variable Interface
Round Up Cents: How to Round Up Pennies Automatically Like a Ferengi in Microsoft Access, Part 2
How to implement an api/GET call using liburl on c/c++
The fork() function in C
calling one program from another program main function in C
Function Calls in Detail | Functions in C | Data Structure Using C
How to use in function call in c program #coding #youtubeshorts #shorts
How to declare and call a function in C++? 🤔 #coding #shorts
function calling program in c language
How to call C Function in Python code ?
How to call a C/C++ function from a Java method - simplified explanation
C-113-Callback Function |#callbackfunction|#pointersinc#Clanguage#logicflow
Calling function vs Called function in C Language
Oracle ODPI-C API for C & C++ Overview Session, March 2020
Function call in C [C Programming Bangla Tutorial]
Functions in C : Function Call in C
Capi vs 99
Комментарии