massive speedup through cython