Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9296B200D38 for ; Sun, 12 Nov 2017 11:56:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 91336160BF0; Sun, 12 Nov 2017 10:56:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D84DB160BD7 for ; Sun, 12 Nov 2017 11:56:02 +0100 (CET) Received: (qmail 27074 invoked by uid 500); 12 Nov 2017 10:56:02 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 27065 invoked by uid 99); 12 Nov 2017 10:56:02 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Nov 2017 10:56:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EBCF6DFDD1; Sun, 12 Nov 2017 10:56:01 +0000 (UTC) From: erdi To: notifications@groovy.apache.org Reply-To: notifications@groovy.apache.org Message-ID: Subject: [GitHub] groovy pull request #633: GROOVY-8377 Equals and hash code ast performance Content-Type: text/plain Date: Sun, 12 Nov 2017 10:56:01 +0000 (UTC) archived-at: Sun, 12 Nov 2017 10:56:03 -0000 GitHub user erdi opened a pull request: https://github.com/apache/groovy/pull/633 GROOVY-8377 Equals and hash code ast performance See [GROOVY-8377](https://issues.apache.org/jira/browse/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](https://github.com/apache/groovy/blob/1c42f421edd91f31aa35a3e7b7113910718b35d5/build.gradle#L93) - the jmh benchmarks for Groovy code are broken and [needed fixing as part of my PR](https://github.com/erdi/groovy/commit/fc1d085a120bd7a542edeb7c1ff4b06816b776b2) 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 https://github.com/erdi/groovy equals-and-hash-code-ast-performance Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/633.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 #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 NullObject.is() method for which no call site caching occurs. ---- ---