As opposed to shifting, the Galil rule deals with speeding up the actual comparisons done at each alignment by skipping sections that are known to match. Suppose that at an alignment , is compared with down to character of . Then if is shifted to such that its left end is between and , in the next comparison phase a prefix of must match the substring . Thus if the comparisons get down to position of , an occurrence of can be recorded without explicitly comparing past . In addition to increasing the efficiency of Boyer–Moore, the Galil rule is required for proving linear-time execution in the worst case.