looks like the `[].sort()` implementation has changed in #nodejs v11 ... one of the katas I had written for the sort function relied on an internal implementation detail (that the array is walked from start to end, that seems to have changed)
I’ve explained it here: https://github.com/nodejs/node/issues/24294#issuecomment-437631621 … TL;DR the order in which elements are compared has always been implementation-dependent. See https://v8.dev/blog/array-sort for more background.
-
-
ok, thanks. that means it's spec-compliant to not rely on it. thanks
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
Previously, V8 used an unstable QuickSort for arrays with more than 10 elements. Now, we use the stable TimSort algorithm.
Demo: