Hi!

Great job!

> 20 марта 2019 г., в 9:10, Heikki Linnakangas <hlinn...@iki.fi> написал(а):
> 
>  Please review, if you have a chance.
> 
> - Heikki
> <0001-Add-IntegerSet-to-hold-large-sets-of-64-bit-ints-eff.patch>

I'm looking into the code and have few questions:
1. I'm not sure it is the best interface for iteration
uint64
intset_iterate_next(IntegerSet *intset, bool *found)

we will use it like

while
{
    bool found;
    BlockNumber x = (BlockNumber) intset_iterate_next(is, &found);
    if (!found)
        break;
    // do stuff
}

we could use it like

BlockNumber x;
while(intset_iterate_next(is, &x))
{
    // do stuff
}

But that's not a big difference.


2. 
 * Limitations
 * -----------
 *
 * - Values must be added in order.  (Random insertions would require
 *   splitting nodes, which hasn't been implemented.)
 *
 * - Values cannot be added while iteration is in progress.

You check for violation of these limitation in code, but there is not tests for 
this checks.
Should we add these tests?

Best regards, Andrey Borodin.

Reply via email to