• Yanqi Lv's avatar
    Optimize dictExpand of empty dict (#12847) · 15b993f1
    Yanqi Lv authored
    If a dict is empty before `dictExpand`, we don't need to do rehashing
    actually. We can just create a new dict and set it as ht_table[0] to
    skip incremental rehashing and free the memory quickly.
    15b993f1
dict.c 62.1 KB