commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1218) EqualsBuilder.append(Object,Object) is too big to be inlined, which prevents whole builder to be scalarized
Date Sun, 08 May 2016 16:35:12 GMT

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

ASF GitHub Bot commented on LANG-1218:
--------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/commons-lang/pull/138


> EqualsBuilder.append(Object,Object) is too big to be inlined, which prevents whole builder
to be scalarized
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: LANG-1218
>                 URL: https://issues.apache.org/jira/browse/LANG-1218
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.builder.*
>    Affects Versions: 3.4
>            Reporter: Ruslan Cheremin
>             Fix For: 3.5
>
>
> Method EqualsBuilder.append(Object,Object) is 327 bc long, while current JIT hot methods
inlining threshold (-XX:FreqInlineSize) = 325. Because of this, .append(Object,Object) is
not inlined: with -XX:+PrintInlining -XX:+PrintCompilation following messages could be seen
> {noformat}
> ....
>   @ 13   o.a.c.l.b.EqualsBuilder::append (327 bytes)  hot method too big 
> ....
> {noformat}
> Fail of inlining, by itself, is not so bad -- just a bit penalty to performance. But
crucial thing here: without all method being inlined Escape Analysis also fails to trace Builder
instance lifespan, and fails to prove it NoEscape. This, in turn, leads EqualsBuilder to be
really allocated on heap.
> The funny thing here is: with .append(O,O) being just 2-3 bytecodes smaller, most of
EqualsBuilder usage scenarios will be scalarized



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message