Cut cost is computed by Cython code