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...
3 comments
[ 1.7 ms ] story [ 21.6 ms ] thread-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?