Hacker News new | comments | show | ask | jobs | submit login
Optimizing Python with Cython (doublemap.github.io)
5 points by erjiang on May 29, 2015 | hide | past | web | favorite | 3 comments

If you can live with changing the signature from two tuples to just taking the four floats, you'll see a big further improvement --- these are the only lines showing up yellow when running the code through cython -a: https://rawgit.com/syllog1sm/a13542690c59d5e60ebf/raw/499418...

Looking at this step:

-from math import sin, cos, acos

+from libc.math cimport sin, cos, acos

What happens if the C math functions and the Python math functions don't take the same arguments/kinds of arguments?

On my system, PyPy is 4x faster than the fastest Cython version given.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact