ctypes:
$ gcc -shared -Wl,-soname,timing_c.so -o timing_c.so -fPIC timing_c.c
cython:
$ cython2 *.pyx
$ gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python2.7 -o timing_cython.so timing_cython.c
$ gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python2.7 -o timing_cython_range.so timing_cython_range.c