You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/05/02 02:04:18 UTC

[jira] [Closed] (GROOVY-7239) Allow optimized array access in static compiled code with indy

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

Paul King closed GROOVY-7239.
-----------------------------

> Allow optimized array access in static compiled code with indy
> --------------------------------------------------------------
>
>                 Key: GROOVY-7239
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7239
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Jochen Theodorou
>            Assignee: Jochen Theodorou
>             Fix For: 2.5.0-alpha-1
>
>
> to perform a intArray[i] access Groovy usually goes through an either fully dynamic path, or a special method in BytecodeInterface8. This has to be done, because of the semantics of allowing a negative array index. This results in a speed penalty even for static compiled code.
> The improvement here is to use invokedynamic to perform the array access instead. The semantics will stay equal, but if a constant call site can be used performance will be on par with Java. This of course works only if the callsite will use static information. This means this change is suitable only for @CompileStatic for now. 
> This change also implies no null check for the array, causing an NPE is the array is null. But this is in line with current behavior in static compilation



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)