4 ms·
(See http://pastebin.com/KypbginU http://pastebin.com/KypbginU) // corrected overflow hget for (int k2=k,o=0; t[k&(SIZE-1)] && **t[k&(SIZE-1)] != k2 && o<SI
by je-so 12y ago
(See http://pastebin.com/KypbginU http://pastebin.com/KypbginU)
// corrected overflow hget
for (int k2=k,o=0; t[k&(SIZE-1)] && **t[k&(SIZE-1)] != k2 && o<SIZE; ++k,++o);
return t+(k&(SIZE-1));
// hset now allows overwrite
for (int (**a)[2] = hget(t, k); a && (*a || (*a=malloc(sizeof(**t)))); (**a)[0]=k,(**a)[1]=v,a=0);