I’m getting odd sorting behavior in V8 7.5. Are there any known bugs?
-
-
Replying to @rauschma
No. Most often when folks see unexpected behavior, they’re using an inconsistent comparison function. What are you doing exactly?
2 replies 0 retweets 0 likes -
Replying to @mathias
Possibly something inconsistent. I suspect that my sorting function is not transitive (and that that matters): https://gist.github.com/rauschma/aed457de428a3935d941424f63830b84 … Fascinating that I only now accidentally produced data that exposes this issue.
1 reply 1 retweet 0 likes -
Replying to @rauschma
Could you include the input, so running the code shows the surprising behavior?
2 replies 0 retweets 0 likes
And yes, it most definitely matters. Search for “consistent comparison function” in https://tc39.es/ecma262/#sec-array.prototype.sort ….
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.