Optimizations involve
Coalesce and ite functions should never show up in generated code.
- Add explicit peephole optimizations that prevent allocations for things like substrings.
For example, instead of
private boolean cond6() {
return ("--x-s3".equals(RulesFunctions.coalesce(RulesFunctions.substring(params.bucket(), 0, 6, true), "")));
}
code generate this instead:
private boolean cond6() {
return (params.bucket() != null && params.bucket().endsWith("--x-s3"));
}
Optimizations involve
Coalesceanditefunctions should never show up in generated code.For example, instead of
code generate this instead: