Note the use of a custom comparison function (compareIDs), which is used to compare numeric field (id) being sorted by. Sorting using LSD Radix Sort is shown below:
Note the simple custom function (getKey), which provides access to the numeric value being sorted by.
Because each object holds more data than just numbers, the Chrome browser runs out of memory at smaller array size – around 10 million elements.
Enjoy, and let me know if it’s been helpful.