Why does Java Compiler flip relational comparisons between primitive types? `i < j` => `i >= j`
Advertisements I’m implementing a deferred refinement operation for my numerical static analysis framework, specifically, integers and longs. For reference, int (and smaller) can be compared directly, no need for a cmp operation. However, I have noticed that the bytecode generated (at least for Java 11 targeting 1.8) for binary comparisons flips the comparison operation. For… Read More Why does Java Compiler flip relational comparisons between primitive types? `i < j` => `i >= j`