The Java application spends most of its time sorting some keys and removing duplicates.
So choosing an adapted sorting algorithm is mandatory.
Keys are integers (around 256bits but not necessarily) and the array sizes are between 1000 and 100000 keys.
The input arrays are made of consecutive key groups. These groups are already sorted and small (around 10 keys).
An array example (3 groups, 32bits keys):
0x01000000
0x01010000
0x01010100
0x01010101
0x01000000
0x01010000
0x01010100
0x01010102
0x01000000
0x01020000
0x01020200
0x01020203
After sorting and removing duplicates :
0x01000000
0x01010000
0x01010100
0x01010101
0x01010102
0x01020000
0x01020200
0x01020203
Any tough ? Any idea ? Any link ?
Thanks
PS : after looking at sorting algorithms including a lot of variations of merge sort, radix sort, qui... I continue digging around hash maps.
PPS : finally I forked Java legacy merge sort, added filtering and the concept of sorted groups. It provides a great speedup.