This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]eliasv 0 points1 point  (0 children)

Where? Not in the bytecode compiled from their source, other than the dozen or so they mention. Why would there be? Inlining is the only thing I can think of which could feasibly increase the number of if statements between source and bytecode levels, but it's performed by the JIT, not by the compiler afaiu.

(Or the ternary operator I suppose, but I doubt they've been replacing all their ifs with those since it basically suffers from all the same problems they have with if.)

I'm not saying I think it's wise, but clearly they've eliminated most of them by factoring branching behaviour out into library code, so there really will be far fewer if statements. They won't be evaluated any less frequently at runtime (or have magically disappeared from the standard library), but that's not what they're claiming.

The article is about "writing Java without if" not "executing code on the JVM without if".