Published at LXer:
Nick Piggin posted an efficient algorithm for converting a data structure, "this is my 'data structure switch' algorithm that can convert one data structure into another, with just a single unlikely branch in fastpaths and no locking or atomic operations (the branch is only triggered when the data structure is in the process of being converted). A pointer indirection is generally also needed when converting a global data structure."
Read More...