- Learning Cython Programming(Second Edition)
- Philip Herron
- 167字
- 2021-07-16 09:45:26
Linking models
Linking models are extremely important when considering how we can extend or embed things in native applications. There are two main linking models for Cython:
Fully embedded Python within C/C++ code, which looks like the following screenshot:

Using this method of embedding the Python runtime into a native application means you initiate execution of code directly from any point in your C/C++ code, as opposed to the Chapter 1, Cython Won't Bite where we had to run the Python interpreter and call an import to execute native code.
For the sake of completeness, here is the import model of using Cython:

This would be a more Pythonic approach to Cython, and will be helpful if your code base is mostly Python. We will review an example of the Python lxml
module, which provides a Cython backend, later in this book, and we can compare it to the native Python backend to review the speed and execution of both code bases to perform the same task.
- 玩轉Scratch少兒趣味編程
- Learning PostgreSQL
- Python自動化運維快速入門(第2版)
- Getting Started with Python Data Analysis
- Keras深度學習實戰
- RESTful Java Web Services(Second Edition)
- Go語言編程
- HTML5開發精要與實例詳解
- Illustrator CS6設計與應用任務教程
- Bootstrap for Rails
- 基于GPU加速的計算機視覺編程:使用OpenCV和CUDA實時處理復雜圖像數據
- Yii2 By Example
- Java Web開發基礎與案例教程
- 基于MATLAB的控制系統仿真及應用
- Python深度學習:基于PyTorch