So I have a time limited problem (the subroutine should be as fast as possible) for doing this. At any point of file I have 2 network files, like this:
Time: 23.369
1464953512
Bytes: 4193304
Time: 24.369
1464953502
Bytes: 4194304
Time: 24.369
1464953502
Bytes: 4194304
Time: 25.404
1464953527
Bytes: 4194304
Take note the 2 files are different and each contain a subset of information, and I need to merge these 2 to create the cumulative information(removing duplicates), like this:
Time: 23.369
1464953512
Bytes: 4193304
Time: 24.369
1464953502
Bytes: 4194304
Time: 25.404
1464953527
Bytes: 4194304
What is the fastest way to do this? (with some code please, if possible).
Thanks.
P.S. I was looking at some diff/merge libraries but I think it will be a overkill for the same. Any simple .net/LINQ magic that can achieve it? Also, the duplicates are serial, as shown and not scattered around.
EDIT: -ve voters please leave a comment so that I can improve or otherwise change the question to be more suitable.