In J2clEqualitySameRewriterPass do the less expensive filtering check first.
@@ -80,9 +80,9 @@ public class J2clEqualitySameRewriterPass extends AbstractPeepholeOptimization {
private static boolean isEqualitySameCall(Node node) {
return node.isCall()
- && isEqualitySameMethodName(node.getFirstChild())
// Do not optimize if one or both parameters were removed
- && node.hasXChildren(3);
+ && node.hasXChildren(3)
+ && isEqualitySameMethodName(node.getFirstChild());
}
private static boolean isEqualitySameMethodName(Node fnName) {
