Which “if” construct is faster – statement or ternary operator?
There’s only one type of “if” statement there. The other is a conditional expression. As to which will perform better: they could compile to the same bytecode, and I would expect them to behave identically – or so close that you definitely wouldn’t want to choose one over the other in terms of performance. Sometimes … Read more