Fast Goodness-of-fit Test