On Tue, 23 Mar 2021 13:33:49 GMT, Coleen Phillimore <cole...@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

Reply via email to