4 ms·
Did a bit of digging and found that there used to be a comment for why it was done, but it got removed [0] when they switched to the implementation from Bentley
by erk__ 3y ago
Did a bit of digging and found that there used to be a comment for why it was done, but it got removed [0] when they switched to the implementation from Bentley & McIlroy's "engineering a sort function" [1] around 1992.
[0]: https://github.com/weiss/original-bsd/commit/d3fcf71e0db57cb346606f3e100c17a565b1cc2f#diff-80cbaaf17a9c3baf31292416f97d13837515bdc13c94eedc285a79504409c708L167-L181 https://github.com/weiss/original-bsd/commit/d3fcf71e0db57cb...
[1]: https://cs.fit.edu/~pkc/classes/writing/papers/bentley93engineering.pdf https://cs.fit.edu/~pkc/classes/writing/papers/bentley93engi...