I am producing flat lists with 10^6 to 10^7 Real numbers, and some of them are repeating.
I need to delete the repeating instances, keeping the first occurrence only, and without modifying the list order.
The key here is efficiency, as I have a lot of lists to process.
Example (fake):
Input:
{.8, .3 , .8, .5, .3, .6}
Desired Output
{.8, .3, .5, .6}
Aside note
Deleting repeating elements with Union (without preserving order) gives in my poor man’s laptop:
DiscretePlot[a = RandomReal[10, i]; First@Timing@Union@a, {i, 10^6 Range@10}]

You want
DeleteDuplicates, which preserves list order:It was added in Mathematica 7.0.