Re:Sentinels Can Be Faster
by augustk on Wednesday September 09, 2020 @04:10PM
(#24425368)
Another classical example of sentinels is improving a linear search by inserting the key as the last element.
[ Parent
| on HN ]
Classical, but often not the best idea, nowadays.
You often cannot know whether that element is writable, and if it is, that will cause problems when running concurrent searches (even for the same key)