Your approach can cause high memory usage with large integers, as it creates a sparse array filled with undefined values. The filter step also adds unnecessary overhead. For large datasets, it's inefficient compared to JavaScript's built-in .sort() or algorithms like Counting Sort or Radix Sort for specialized cases. Stick with .sort() for practicality and performance.