Comparing the performance of Python, NumPy and C extensions
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 15 commits ahead of mattfowler:master.

README.md

PythonCExtensions

Using a Python C extension and comparing its performance to NumPy and Python

You need to build the C extension before running this. To build and install the extension run:

$ python3 setup.py install

stdtest.py has a main method which will compare Python, NumPy and the C extension for small arrays and plot the performance with matplotlib.

I've modified the wrapper to work both Python 2 and 3.

Results

Dependencies

Cython

$ pip3 install Cython

Pybind11

$ brew install pybind11

References