Eric Milles created GROOVY-10395:
------------------------------------

             Summary: SC: <=> compiled to ScriptBytecodeAdapter#compareTo for 
primitives
                 Key: GROOVY-10395
                 URL: https://issues.apache.org/jira/browse/GROOVY-10395
             Project: Groovy
          Issue Type: Improvement
          Components: Static compilation
            Reporter: Eric Milles
            Assignee: Eric Milles


Consider the following:
{code:groovy}
@groovy.transform.CompileStatic
int test(int a, int b) {
  a <=> b
}
{code}

"a <=> b" for primitive types is not optimized to make use of Integer#compare 
-- instead it is transformed into {{ScriptBytecodeAdapter.compareTo(a,b)}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to