Both kinds of arrays can be sorted, with substantial performance differences. Below is a graph of sorting performance of array of 32-bit unsigned integers versus Uint32 typed array:
From array size of 1K up to 16M, sorting typed arrays is 4X to 6X faster than standard arrays. Above 62K typed arrays are consistently 6X faster to sort. About 8 Million Uint32’s per second is the performance level when sorting typed arrays of Uint32’s.
LSD Radix Sort performs at the same level for standard arrays and for typed arrays.
Sorting Faster in Special Cases
Both of these Counting Sort algorithms have just been added to version 1.1.0 of hpc-algorithms npm package.
NPM and Source Code
The above LSD Radix Sort and Counting Sort algorithms are available in hpc-algorithms npm. This package is open source and free. The algorithms were ported from C++ and C# HPCsharp nuget package, which is also open source and free.
In C# support for most of the data types has been implemented, such as floating-point and signed integer. Also, MSD Radix Sort has been implemented, which is in-place.