You have to compare by logical sections to minimize comparison. Otherwise a single line inserted at the start would affect everything else that follows.