Remove the pointless if in if (pmap_get(k) != v) pmap_insert(k, v).