On 9/21/21 12:34, Mark Gray wrote:
> On 17/09/2021 18:17, Ilya Maximets wrote:
>> Current algorithm of ovsdb_datum_union looks like this:
>>
>> for-each atom in b:
>> if not bin_search(a, atom):
>> push(a, clone(atom))
>> quicksort(a)
>>
>> So, the complexity looks like this:
On 17/09/2021 18:17, Ilya Maximets wrote:
> Current algorithm of ovsdb_datum_union looks like this:
>
> for-each atom in b:
> if not bin_search(a, atom):
> push(a, clone(atom))
> quicksort(a)
>
> So, the complexity looks like this:
>
>Nb * log2(Na) +Nb + (Na
Current algorithm of ovsdb_datum_union looks like this:
for-each atom in b:
if not bin_search(a, atom):
push(a, clone(atom))
quicksort(a)
So, the complexity looks like this:
Nb * log2(Na) +Nb + (Na + Nb) * log2(Na + Nb)
Comparisonsclones