optimize with Cython

optimize with Cython !!!