private void delete(int i) {
        if (i < 0 || i >= size) {
            return;
        }
        --size;
        while (i < size) {
            entries[i] = entries[i + 1];
            ++i;
        }
        entries[i] = null;
    }
This is an extremely expensive implementation of
{@link Set#containsAll(Collection)}. It is implemented as O(n**2).
vespajlib/src/main/java/com/yahoo/collections/ArraySet.java