RFR: 8264004: Don't use TRAPS if no exceptions are thrown [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Tue Mar 23 13:42:42 UTC 2021
On Tue, 23 Mar 2021 13:33:49 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/oops/constantPool.cpp line 1426:
>>
>>> 1424: bool match_entry = compare_entry_to(k1, cp2, k2);
>>> 1425: bool match_operand = compare_operand_to(i1, cp2, i2);
>>> 1426: return (match_entry && match_operand);
>>
>> Is it worth changing this to: return (compare_entry_to(...) && compare_operand_to(..));
>> Then if the first one is false the second call isn't needed?
>
> I kind of thought these would make a long complicated expression and so the single use variables is helpful. I don't think performance is important here.
{code}
- match = compare_entry_to(recur1, cp2, recur2);
- if (match) {
+ if (compare_entry_to(recur1, cp2, recur2)) {
return true;
}
I could do this
-------------
PR: https://git.openjdk.java.net/jdk/pull/3141
More information about the hotspot-dev
mailing list