I have > 50GB array, stored in a file. Too big for my RAM. The file has the simple binary format uint64_t, uint64_t, uint64_t
. So i have random access on the > 2.000.000.000 elements.
Now I need to sort them by the first and second element (two seperate files). Is there any trick to speed up the sorting? I have 16GB RAM so maybe loading chunks and sort thema separatly? But I down know any algorithm that does this.