https://github.com/rbaltrusch/python_performance_examples
Examples on how to setup numba, cython and c-extensions for speed improvements in Python projects
https://github.com/rbaltrusch/python_performance_examples
c-extension cython examples-python julia julialang numba optimization performance python python3
Last synced: 3 months ago
JSON representation
Examples on how to setup numba, cython and c-extensions for speed improvements in Python projects
- Host: GitHub
- URL: https://github.com/rbaltrusch/python_performance_examples
- Owner: rbaltrusch
- License: mit
- Created: 2022-07-12T15:47:28.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-09-10T14:02:42.000Z (3 months ago)
- Last Synced: 2025-09-10T18:25:00.364Z (3 months ago)
- Topics: c-extension, cython, examples-python, julia, julialang, numba, optimization, performance, python, python3
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Python performance examples
Examples on how to setup numba, cython and c-extensions for speed improvement in Python projects.
A benchmark of the different optimization approaches can be seen in the graph below. Note that the absolute runtime numbers shown may vary from machine to machine.

Note: software versions used were Python 3.8.8, Cython 0.29.23, numba 0.53.1 and Julia 1.7.3.
## Getting started
To get a copy of this repository, simply open up git bash in an empty folder and use the command:
$ git clone https://github.com/rbaltrusch/python_performance_examples
To run a particular example, change from the root of the repository into its example folder (e.g. source/base_example), then follow the run instructions in the example's README.md file. Note that each example has a different set of dependencies that may need to be installed before running the example. These dependencies are documented in the requirements.txt file in the respective example folder.
## Contributions
To contribute, please read the [contribution guidelines](CONTRIBUTING.md).
## Python
Written in Python 3.8.8.
## License
This repository is open-source software available under the [MIT License](LICENSE).
## Contact
Please raise an issue for code changes. To reach out, please send an email to richard@baltrusch.net.