[ 
https://issues.apache.org/jira/browse/GROOVY-11842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18052986#comment-18052986
 ] 

ASF GitHub Bot commented on GROOVY-11842:
-----------------------------------------

paulk-asert commented on PR #2369:
URL: https://github.com/apache/groovy/pull/2369#issuecomment-3771139287

   I checked performanceTests on master (with this PR applied) against earlier 
versions:
   
   ```
   > Task :performance:performanceTests
   Groovy current              Average 261.43ms ± 10.99ms 
   Groovy 5.0.3                Average 266.45ms ± 16.2ms (1.92% slower)
   Groovy 4.0.29               Average 299.62ms ± 49.13ms (14.61% slower)
   Groovy 3.0.25               Average 366.03ms ± 112.66ms (40.01% slower)
   ```
   
   That test is a crude measure (true for most microbenchmarks) of compilation 
speed - which isn't what this PR is about but just checking that we didn't 
introduce a bottleneck speed-wise wrt this PR.
   




> 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
>            Priority: Major
>              Labels: performance
>         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