1. A data processing apparatus comprising: a comparison unit configured to perform an element comparison process between a first vector of data elements and a second vector of data elements, said element comparison process comprising performing a comparison of a first data element at a first index in said first vector with a second data element at a second index in said second vector; and a hazard vector generation unit configured, if said comparison unit determines a match condition between said first data element and said second data element to be true, to populate a hazard vector at an index determined by said first index with a value determined by said second index, wherein said comparison unit is configured to perform said element comparison process by iteratively performing said comparison for data elements of said first vector with each element of a subset of said second vector, and wherein said comparison unit is configured to determine said subset of said second vector as those data elements at indices in said second vector which are less than a current index of said first vector for which said comparison is to be performed and which are greater than any previously determined value of said second index for which said match condition was true.