Compaction Issue

Hi all,

So I have a large set of data, of which every iteration I only need to perform processing/updates on a small subset of items, which led me to choose a certain compaction algorithm. The compaction works great, however I still need the original dataset for the next iteration (the original set, with the newly updated subset included).

Does anyone have any good recommendations of how to do this? Was compaction the wrong choice?

Thanks

What you want might be better represented as a sort, where the key is 0 or 1 (in or not in the subset). You could look at sorting algorithms and see how they perform.