Cython version of cgs_update.