Is this a new sorting algorithm? I just came up with a simple sorting algorithm that is faster than ShellSort when the range of values is smaller than the number of elements.
Is this new?  And if so, what should I do with it?

https://github.com/Frazer/hashSort

let hashSortNonUnique = (unsortedArray)=&gt;{
  let myHash = {}
  let min = Infinity;
  let max = -Infinity;

  unsortedArray.forEach(val=&gt;{
    myHash[val]=myHash[val]?myHash[val]+1:1;
    if(val&gt;max) max = val;
    if(val&lt;min) min = val;
  });

  let count = 0;

  for (let sorter = min; sorter &lt;= max; sorter++) {
    let num = myHash[sorter];
    while(num--){
      unsortedArray[count]=sorter;
      count++;
    }
  }
  return unsortedArray;
}

let hashSortObjectsWithNonUniqueVals = (unsortedArray,valFunction)=&gt;{
  let myHash = {}
  let min = Infinity;
  let max = -Infinity;

  unsortedArray.forEach(val=&gt;{
    v= valFunction(val);
    myHash[v]=myHash[v]?myHash[v].push(val):[val];
    if(v&gt;max) max = v;
    if(v&lt;min) min = v;
  });

  let count = 0;

  for (let sorter = min; sorter &lt;= max; sorter++) {
    let vals = myHash[sorter];
    for (let index = 0; index &lt; vals.length; index++) {
      unsortedArray[count]= vals[index];
      count++;      
    }
  }
  return unsortedArray;
}
The first is a counting sort with the change that you use a hashtable instead of an array to hold the mapping between element value and the number of elements of that value.

The second is a near textbook Bucket Sort with the change that you don't sort the bucket.