Module:stable sort/documentation

Hello, you have come here looking for the meaning of the word Module:stable sort/documentation. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:stable sort/documentation, but we will also tell you about its etymology, its characteristics and you will know how to say Module:stable sort/documentation in singular and plural. Everything you need to know about the word Module:stable sort/documentation you have here. The definition of the word Module:stable sort/documentation will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:stable sort/documentation, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module provides an alternative to table.sort that is stable, i.e. guarantees that elements considered equal by the given order will keep their relative positions.

It supports the same parameters as table.sort; the first parameter is the array to sort, and the second (optional) parameter is a comparison function, which returns true if and only if the first parameter is less than the second. If the comparison function is not specified, the default less-than operator < is used.

This function ranges anywhere from slightly to significantly slower than table.sort and should only be used in cases where sorting stability is a requirement.