commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marschall <...@git.apache.org>
Subject [GitHub] commons-lang pull request: LANG-1218 EqualsBuilder.append is too l...
Date Sun, 08 May 2016 09:11:02 GMT
GitHub user marschall opened a pull request:

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

    LANG-1218 EqualsBuilder.append is too large

    EqualsBuilder.append(Object, Object) is 327 bytes which is 2 bytes
    above the default inline limit of 325 of HotSpot (MaxInlineSize). Micro
    benchmarking has shown this can have a significant performance impact.
    Currently EqualsBuilder can be two to three times slower than writing
    the equals method "by hand". Once the method is small enough to be
    inlined EqualsBuilder has more or less the same performance as writing
    the equals method "by hand".
    
    There are different ways to push the method under the the inline limit.
    I decided to factor out the array handing of append(Object, Object)
    into a method. This leaves the body of append(Object, Object) to do
    what I presume is the common case, the non-array case.
    
    Issue: LANG-1218
    https://issues.apache.org/jira/browse/LANG-1218

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/marschall/commons-lang LANG-1218

Alternatively you can review and apply these changes as the patch at:

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #138
    
----
commit 8558cb2425ae073d1f441176761791f38d687177
Author: Philippe Marschall <philippe.marschall@gmail.com>
Date:   2016-05-08T09:03:05Z

    LANG-1218 EqualsBuilder.append is too large
    
    EqualsBuilder.append(Object, Object) is 327 bytes which is 2 bytes
    above the default inline limit of 325 of HotSpot (MaxInlineSize). Micro
    benchmarking has shown this can have a significant performance impact.
    Currently EqualsBuilder can be two to three times slower than writing
    the equals method "by hand". Once the method is small enough to be
    inlined EqualsBuilder has more or less the same performance as writing
    the equals method "by hand".
    
    There are different ways to push the method under the the inline limit.
    I decided to factor out the array handing of append(Object, Object)
    into a method. This leaves the body of append(Object, Object) to do
    what I presume is the common case, the non-array case.
    
    Issue: LANG-1218
    https://issues.apache.org/jira/browse/LANG-1218

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message