Add fast check

sort_and_comp is another way to implement fast_check, but it's slower than fast_check, and even slower than check.