The Bizarreness of Optimization

Background: consider the hashtable with closed addressing/separate chaining: Typically, we can have two different schemes to link through all the nodes. One is to link the last node of the current bucket to the first node of the next non-empty bucket. See the above picture and imagine taht there are links among these buckets. Another …

How To Implement A Real Emplace Routine

Above is a piece of code that attempts to implement the emplace family routines. One can insert something like const value_type& (value_type&&) val or variadic arguments Args&&… args, both of which then can be handled by the insert_leaf_at subroutine Of course, this simple implementation is flawed as it requires an extra move operation. In order …