avoid repeatedly regenerating and recompiling static cython functions