Cythonized torus generation. 200 ms to 7 ms.