compare_results.sh: speed up comparison loop

The script takes quite long to parse each and every line O(n**2). Rather
directly pick only those lines that contain the test name in the grep that
feeds into the loop.

Change-Id: I0d4987b11c3feaef3a7fc56d764c43386865004f
1 file changed