Due to a logic error, the dup ptr table sometimes wans't being
grown, leading to extremely slow cloning.
p4raw-id: //depot/perl@22830
* hash values e.g. if they grow faster in the most significant
* bits */
UV hash = PTR2UV(oldv);
- bool i = 1;
+ bool empty = 1;
assert(tbl);
otblent = &tbl->tbl_ary[hash & tbl->tbl_max];
- for (tblent = *otblent; tblent; i=0, tblent = tblent->next) {
+ for (tblent = *otblent; tblent; empty=0, tblent = tblent->next) {
if (tblent->oldval == oldv) {
tblent->newval = newv;
return;
tblent->next = *otblent;
*otblent = tblent;
tbl->tbl_items++;
- if (i && tbl->tbl_items > tbl->tbl_max)
+ if (!empty && tbl->tbl_items > tbl->tbl_max)
ptr_table_split(tbl);
}