compare_dg_tests.pl: Improve merge() performance

If a test from the reference sum file isn't found in another sum file, then
the function needs to know whether the corresponding exp file is present in
all the sum files being merged.

This was done naively by going through all the tests and doing a string
match, but it turns out that when there are hundreds of thousands of tests,
it takes hours to run.

Fix the problem by adding a new hash to separately record the exp files
present in the sum file. This reduces the merge from hours to seconds.

Change-Id: I4a81349a363022b09395600f08875126b41641f6
1 file changed