Diffing two lists of business objects
I would go down the simple road:

1) Converting both lists to sets

2) Use set operations:

    Set&lt;Integer&gt; update = new HashSet&lt;&gt;(list1);
    Set&lt;Integer&gt; insert = new HashSet&lt;&gt;(list1);
    Set&lt;Integer&gt; delete = new HashSet&lt;&gt;(list2);
    update.retainAll(delete);
    insert.removeAll(delete);
    delete.removeAll(update);


Done.

Even if it is not the fastest solution, it should not be too bad for only 5k objects. It is simple, readable and not errorprone.