groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serega Sheypak <serega.shey...@gmail.com>
Subject Re: Optimizing groovy performace
Date Sun, 17 Apr 2016 16:44:36 GMT
Ok, finally the solution is:

             count = 139724

         mean rate = 8950.43 calls/second

     1-minute rate = 2011.54 calls/second

     5-minute rate = 426.96 calls/second

    15-minute rate = 143.76 calls/second

               min = 0.02 milliseconds

               max = 24.18 milliseconds

              mean = 0.08 milliseconds

            stddev = 0.72 milliseconds

            median = 0.06 milliseconds

              75% <= 0.08 milliseconds

              95% <= 0.11 milliseconds

              98% <= 0.15 milliseconds

              99% <= 0.20 milliseconds

            99.9% <= 1.27 milliseconds


Mean rate for indy+InvokeDynamic is about 300-400 ops/sec

Right now rate is 20 times bigger.

What I did?

1. Rewrote part of code to make @CompileStatic work

2. disabled indy+invokeDynamic.

So, next time I'll write the whole core in Java/scala. And only few lines
of code will be in groovy. Really, there are 5 lines of code where I really
need distinguishing groovy features. I had to use them with care.

2016-04-17 16:55 GMT+02:00 Jochen Theodorou <blackdrag@gmx.org>:

> On 17.04.2016 14:36, Serega Sheypak wrote:
>
>> ok, I see weird results.
>> I've wrote a test
>> https://gist.github.com/seregasheypak/d59997dd2d2dfbf82e310b16398239ca
>>
>> Here are metrics for method named "play"
>>
>> TriggerPlayer.play-trigger
>>
> [...]
>
>> Here are metrics for method named "executeHere"
>>
> [...]
>
>> "executeHere" faster in 40 times (acrroding to 99th percentile).
>>
>> I just copy-pasted body of method directly to test...
>>
>> What does it mean, why it works faster?
>>
>
> I am not sure I can understand your code, I miss too much context. But if
> copying the body of the methods directly in the test means you get 40 times
> faster, then this is probably due to inlining not working.
>
> bye Jochen
>

Mime
View raw message