The Bucket Sort algorithm,will increase you application performance
The Bucket sort is a comparison sort algorithm that operates on elements by dividing them into different buckets and then sorting these buckets individually.
It makes assumptions about the data, like radix and counting sort,because it makes assumptions, also it can sort in O(n) time.
Performs best when hashed values of items being sorted are evenly distributed, so there aren’t many collision.
The value in bucket X must be greater than the values in bucket X-1, and less than the values in bucket X + 1.
For Bucket Sort phases:
1. Distributed the items into buckets based on their hashed values (scattering phase),
2. Sort the items in each bucket,
3. Merge the buckets — can just concatenate them (gathering phase).
Example:
We want to sort this array, using the three phases I mentioned above :

For its time complexity:
A- Not in-place, it needs creation of another array in memory.
B- Stability will depend on sort algorithm used to sort the buckets, ideally you want a stable sort.
C- To achieve O(n), it must have only one item per buckets, because it is fast when the number of items is small.
In closing, I share with an example of implementation on Github : her