[AS3] sortOn question

Array.sortOn(); How is this sort performed, and how does it differ from just doing a simple loop through the array and sort based on that? Let’s imagine I didn’t think of this function while developing something, and I happened to sort things by looping through it, would there be any significant difference on switching my ugly loop to this?

Thank you.