Skip to content

Comparing the performance of Python, NumPy and C extensions

Notifications You must be signed in to change notification settings

mattfowler/PythonCExtensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PythonCExtensions

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

Companion to Speeding Up Python and Numpy

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

python setup.py install

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

c_vs_numpy.py has a main method which will compare NumPy and the C extension for larger arrays and plot the performance with matplotlib to see at which point NumPy will win performance wise.

The head of master will work with Python 3.7, for Python 2.7 see the 2.7 tag in this repository.

About

Comparing the performance of Python, NumPy and C extensions

Resources

Stars

Watchers

Forks

Packages

No packages published