wrap a cython function for more precise profiling