Set analysis is vast majority of times always faster than if statements. the reason is that your if statement gets calculated for each line which means it doesn't get cached. while set analysis gets calculated once.
Possible exceptions are really complex aggr within the set. Fastest ofcourse is flags. but as you say not always possible and not the most flexible