Further optimize fast9 check code. Now runs in log(9) iterations.