Remove the memcpy spam in [btree.c#L338](https://github.com/0undefined/btree/blob/master/src/btree.c#L338). It should be fine to simply do ```C i = n - 1; while (i > 0 && cmp(elem, items+(i*size)) < 0) i--; memmove(...); memcpy(...); ... ```