Optimization on List key comparisons and return value with HashMap
public static List&lt;DataSt&gt; compO(List&lt;DataSt&gt; curR, List&lt;DataSt&gt; prevR) {

    Map&lt;String,DataSt&gt; cur = new HashMap&lt;&gt;();Map&lt;String,DataSt&gt; prev= new HashMap&lt;&gt;();
   curR.parallelStream().forEach(entry -&gt; cur.put(entry.key,new DataSt (entry.time,entry.memory)));
   prevR.parallelStream().forEach(entry -&gt; prev.put(entry.key,new DataSt (entry.time,entry.memory)));

    List&lt;DataSt&gt; comp = new ArrayList&lt;DataSt&gt;();
    for (Entry &lt; String, DataSt &gt; abc: cur.entrySet()) {
        final String key = abc.getKey();
        if (prev.containsKey(key)) {
            saveIt(abc.getValue(), prev.get(key), key, comp);
        } else {
            saveIt(key, comp);
        }
    }

    for (Entry&lt;String, DataSt&gt; abc: prev.entrySet()) {
        final String key = abc.getKey();
        if (!(cur.containsKey(key))) {
            saveIt(key, comp);
        }
    }
    return comp;
}


Also you can try to use parallel stream on map, but it should not be HashMap, and I'm not sure that it will be faster.