Update examples and add benchmark.
Gitignore autocompiled c/cpp files.
Move test folder.
This package demonstrates some usefull cases how to use cython.
In demo_cython.pyx
there are examples for:
In demo_c.pyx
there is an example for external c code used
within python.
In demo_cpp.pyx
there is an example for external cpp code
used within python.
This benchmark is not done in an isolated environment but shows a little
how big the velocity improvement can be using cython.
The output was generated running show_magic
which will run each fibonacci
implementation to get the 40th number.
Time Python: 51.1399
Time Cython: 12.3765
Time Cython Typed: 12.1667
Time Cython hyprid Cpp: 0.3255
Time Cython hybrid C: 0.3413
Time Cython lib Cpp: 0.3378
Time Cython lib C: 0.3464
git clone git@git.sr.ht:~busykoala/cython_hints
cd cython_hints
python3 -m venv .
source ./bin/activate
pip install -e .
show_magic
source ./bin/activate
pip install -e ".[test]"
python -m pytest