What is the reason sort
is implemented as to-array -> garray/stableSort -> seq
? Is it still faster than doing sorting in cljs?
This is also what Clojure does
Modern js guarantees stable sort now, so could use native array sort instead of stableSort now (saves extra allocation I think, I don’t remember the impl exactly)
What are you thinking of that might be better?
how else would you sort? you always go to an array and sort that in a mutable way. even doing it with transients would probably be a lot slower
* Runtime: Same as <code>Array.prototype.sort</code>, plus an additional
* O(n) overhead of copying the array twice.
would be interesting to see how much that overhead is in practice