A fast resample method for parametric and semiparametric models