[ 
https://issues.apache.org/jira/browse/GROOVY-11842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun resolved GROOVY-11842.
---------------------------------
    Fix Version/s: 6.0.0-alpha-1
                   5.0.5
         Assignee: Jochen Theodorou
       Resolution: Fixed

Merged and backported. Thanks a lot!

> Invokedynamic first invocation should not have a line with IndyInterface
> ------------------------------------------------------------------------
>
>                 Key: GROOVY-11842
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11842
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Jochen Theodorou
>            Assignee: Jochen Theodorou
>            Priority: Major
>              Labels: performance
>             Fix For: 6.0.0-alpha-1, 5.0.5
>
>         Attachments: improved_indy.svg, improved_indy_startup.svg, 
> screenshot-1.png
>
>
> As can be seen in the IndyInterfaceUsageTest there is a stack trace element 
> showing IndyInterface.  This is bad for inlining and general performance.
>   !improved_indy.svg!
> of course a programm like 
> {code:Java}
>   int foo(){1}
>   int a
>   for (int i=0; i<MAX; i++) {
>    a = foo()
>   }
> {code}
> is not much of a test for anything. It was supposed to show better inlining, 
> but unlike Groovy 3 all later Groovy version fail to unroll the loop and 
> eliminate the assignment to a for later executions. The graph though shows 
> that the branch performance is better than Groov 3 or 4. Not only in the long 
> run, but also on start. But be aware the graph above is from the 5th 
> iteration of 1k calls to be able to see things more in scale. The first 4 
> iterations of 1k calls look like this:
>  !improved_indy_startup.svg! 
> to actually be able to see differences the iteration size is now 100 calls 
> and the y-axis is logarithmic. I want to especially point out how the 
> no-primopts variant has similar initial cost as indy. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to