The previous implementation looped over all mappings for each test src.
This isn't terrible in practice since most tests will have a single src.
However, if it has more, it is O(N*M) where N is the number of srcs and
M in the number of mappings.
Instead, turn it into an O(N + M) loop by only traversing the srcs and
mappings once each.
The previous implementation looped over all mappings for each test src. This isn't terrible in practice since most tests will have a single src. However, if it has more, it is O(N*M) where N is the number of srcs and M in the number of mappings.
Instead, turn it into an O(N + M) loop by only traversing the srcs and mappings once each.