On Wed, Mar 23, 2016 at 3:19 AM, Jeffrey Sarnoff <[email protected]> wrote: > ifelse(condition::Bool, x, y) > Return x if condition is true, otherwise return y. > This differs from ? or if in that it is an ordinary function, so all the > arguments are evaluated first. > In some cases, using ifelse instead of an if statement can eliminate the > branch in generated code > and provide higher performance in tight loops. > > What characterizes the cases where ifelse( condition, x, y ) eliminates the > conditional branch? >
In all cases. More precisely, what the last sentence means is that llvm can remove the branch for if statement in some cases. > >
