Behdad Esfahbod f07bf0c266 [cython] Add some cython annotations
Compare:

Python:
behdad:cu2qu 0$ python __init__.py
curve_to_quadratic:	 62.7us
curves_to_quadratic:	163.2us

Cython:
behdad:cu2qu 0$ cython --embed -a __init__.py && gcc __init__.c `python-config --cflags --libs` -O3 && ./a.out
curve_to_quadratic:	 30.4us
curves_to_quadratic:	 77.8us

Cython without this commit:
behdad:cu2qu 0$ cython --embed -a __init__.py && gcc __init__.c `python-config --cflags --libs` -O3 && ./a.out
curve_to_quadratic:	 43.9us
curves_to_quadratic:	113.3us

So, 2x speedup compared to Python. 1.5x speedup compared to Cython without annotations.

More to be done.
2018-09-25 17:18:15 -04:00
..