Slightly faster resampling