I need to compare results of two lists coming from two different sources.
List<MyData> baseList = new ArrayList<>();
and
List<MyData> externalList = new ArrayList<>();
I need to compare CFCHash records on both the lists w.r.t the UserACCNUM, If there is any changes in the CDCHash I need to update that particular record in baseList.
I tried below looping which didn't sound me efficient
for(MyData ext : externalList) {
for(MyaData base : baseList) {
if(ext.getCDCHash().equals(base.getCDCHash()) && ext.getAccNum().equals(base.getAccNum()) {
// no change
}
else {
// changes found - need to update
}
}
}
Is list.stream() efficient in this case? I have nearly 100k records to compare.
How do I achieve this efficiently?

