Re:Changing std:sort at Google’s scale and beyond
by orlp on Wednesday April 20, 2022 @04:45PM
(#31102776)
Yes, I had a nasty bug in an initial version of glidesort where I (naively) assumed that I could create a temporary copy of an element by doing a memcpy and call the comparison function on this temporary copy a bunch of times before throwing it away, since I assumed the comparison function would not mutate the copy. Unfortunately interior mutability means this would lead to potential double drops, and it was just not sound.
[ Parent
| on HN ]
There are no comments on this comment yet.