[llvm-commits] Please review the patch for IntegersSubsetMapping

Benjamin Kramer benny.kra at gmail.com
Sat Jul 7 14:50:25 PDT 2012


On 04.07.2012, at 08:15, Stepan Dyatkovskiy wrote:

> A few words about diff operation.
> Let we have two subsets of integers. diff operation per signle pass allows to calculate
> LHS exclude RHS
> RHS exclude LHS
> and
> LHS intersect RHS.
> 
> Subset is represented as set of ranges and single numbers.
> Generic algorithm may be greatly optimized for case when both of subsets contains single numbers only.
> Some optimizations are possible when one of LHS or RHS contains big amount of single numbers.


Hi Stepan,

I find it really hard to read this patch. Can you add some explanatory comments on what happens here?
Also, if it is a performance optimization it would be really nice to have some numbers to justify the added complexity.

On the code style side there are still some minor issues with this patch, some while loops are missing the space between "while" and the opening parenthesis.

Last but not least an earlier iteration of this patch had caused PR13256, you should include a regression test for the bug so it doesn't crop up again.

- Ben



More information about the llvm-commits mailing list