groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erdi <>
Subject [GitHub] groovy pull request #633: GROOVY-8377 Equals and hash code ast performance
Date Sun, 12 Nov 2017 10:56:01 GMT
GitHub user erdi opened a pull request:

    GROOVY-8377 Equals and hash code ast performance

    See [GROOVY-8377]( for the rationale
behind this PR.
    Given how simple the fix is and its impact (from 3k ops/ms to 30k ops/ms on my machine)
I'd suggest considering backporting of it to 2.4.x, 2.5.x and 2.6.x lines.
    Working on this was harder then it should be down to:
    - the build takes a minute(!) to configure, I believe it is down to [this code](
    - the jmh benchmarks for Groovy code are broken and [needed fixing as part of my PR](
    I understand that I worked against master, but the experience was highly unwelcoming.

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

    $ git pull equals-and-hash-code-ast-performance

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

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

    This closes #633
commit fc1d085a120bd7a542edeb7c1ff4b06816b776b2
Author: Marcin Erdmann <>
Date:   2017-11-12T10:23:26Z

    Fix Groovy dependency in performance tests to be the same as the one used by Gradle so
that jmh benchmarks using Groovy don't fail

commit 3c6d1d462569259aad6ef95b73af4c17837595b0
Author: Marcin Erdmann <>
Date:   2017-11-12T10:25:03Z

    Add a benchmark for hashCode() generated using @EqualsAndHashCode when instance on which
hashCode() is called has null fields and properties

commit 2ce280083e30d912829d010592384c72b5b406cf
Author: Marcin Erdmann <>
Date:   2017-11-12T10:26:39Z

    Add a test to verify that changes to generating hashCode() for instances with null fields
and properties and EqualsAndHashCodeASTTransformation have no impact on the value returned

commit bd2b79c2cf67b99020265dca2465e18b2a40b2c8
Author: Marcin Erdmann <>
Date:   2017-11-12T10:29:41Z

    Improve performance of generated hashCode() methods for instances with null fields and
properties by avoiding calling method for which no call site caching occurs.



View raw message