An open API service indexing awesome lists of open source software.

https://github.com/jsmolina/c-api-python

This repo provides some basic examples of using simplest fib implementation with C code and calling it from Python
https://github.com/jsmolina/c-api-python

bindings c ctypes ctypes-bindings cython fast fibonacci python rust rustlang swig

Last synced: 3 months ago
JSON representation

This repo provides some basic examples of using simplest fib implementation with C code and calling it from Python

Awesome Lists containing this project

README

          

c-api-python
============

basic (working) examples of C binding, ... to a very simple iterative fibonacci function.

Sometimes the best way to speed up your code it's just to write some C code.

Just run ./compile.sh in each subfolder and you'll see the performance by yourself.

# boostexample
C++ implementation binded with boost.

# rust
Used with pyO3 integration.

# native
'native' implementation in pure python

# manual-binding
python user-defined integration with c code.

# ctypes
using only python code and loading a compiled shared library

# boost
example using boost

# cython
pure implementation in cython

# swig
swig bindings to use C code.

# numba
just use of jit decorator.