Skip to main content
4 events
when toggle format what by license comment
3 hours ago comment added Theodor Zoulias @Bergi yep, your point is valid. So the assumption probably was that the keySelector is somewhat expensive, but not so expensive to call and cache it lazily on demand.
5 hours ago comment added Bergi "implemented under the assumption that the keySelector will be inexpensive, [so it] is invoked invariably for all the elements in the sequence, before starting the sorting." - I would argue that the assumption was that the selector call is expensive, not inexpensive, which is why it is executed up-front only once per element, not for each comparison operation during the sorting.
yesterday history edited Theodor Zoulias CC BY-SA 4.0
Removed some incorrect speculative statements, and added links to Microsoft's source code.
yesterday history answered Theodor Zoulias CC BY-SA 4.0