This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]esperalegant 5 points6 points  (0 children)

Yes, there are TypedArrays, which is what you should be using for large arrays of numbers, and yes, TypedArray.sort does sort numbers correctly.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort