From dev-return-4933-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Sun May 27 20:37:40 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C0580180676 for ; Sun, 27 May 2018 20:37:39 +0200 (CEST) Received: (qmail 10122 invoked by uid 500); 27 May 2018 18:37:38 -0000 Mailing-List: contact dev-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 dev@groovy.apache.org Received: (qmail 9766 invoked by uid 99); 27 May 2018 18:37:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 May 2018 18:37:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1647A180884 for ; Sun, 27 May 2018 18:25:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.02 X-Spam-Level: X-Spam-Status: No, score=-0.02 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=selskabet-org.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qexz7Nq1SUdU for ; Sun, 27 May 2018 18:25:35 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 49F0F5F195 for ; Sun, 27 May 2018 18:25:34 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id o78-v6so26630832wmg.0 for ; Sun, 27 May 2018 11:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=selskabet-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=v4ZGOl4ZptoOlq+xdBrHLlVjbnbSaUDeLlAY+9wV/Ig=; b=lPcxUzUrmWXkP6NTDa0As5kChKDTfNzhBLsX1jUjV/5HOBuTkdZ3tAcV/wkxPdG5Rw wLcuoIRlD5NI0Kl+sjvqg4nu9q6cqw41tEJLp3l00ZkGSn59PQTxUqDhp5FbEzkOEe9R 6QIlIvs0JPiuYBhEt3HqRi11oFKmHmPZg14rkXmVvj0EEp1ESHSaEpifpdCTBj33/f45 m5UhqpjlGw+a+h73ppRmSw/gK5m1sT8+y1UkdovURS0WoZwbRD3rUMEQZD14KZCDzru8 cNQSW5Fw/Bl9aJmB6ONmnI/KBAYu3bPFFwvjeHaBHFgpzRd7TceGx5euz+bg6HM8D92k KlrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=v4ZGOl4ZptoOlq+xdBrHLlVjbnbSaUDeLlAY+9wV/Ig=; b=dlqX3/YjUkIAWwZeL/ZW2TX9aUzvNzCTOdukfo95RaF6spBX7+uAOWHuo3G6J7Y23Y sBXpv7ikx2vuBH0g/7D+bWKONIJYGIaNknpqkOnAYyLpluRFQBv5I1XZpidHZnVZt/x5 j5832y43LAPPMM+D0r+KAIHLbLxa8QW6p3Sm6GCp4bgGI+40HGp2GXJF7LFA2/FMYwZl wtota3NwbzhzHmWpko34GpmpX8m6/gRwB1VNVYW7X0p17lImfqZfaikf895SCGbJtnhM if5dym7e8JjMDxPj44rfgS4Ht9mWGV/b5qACSeEWpNJzMjaB3/+t8cCeFVwveDfQt1qk qSpA== X-Gm-Message-State: ALKqPwet0nJw8snUFKFxfvlM41GOH8WO4nVlQRdjSk93VFCyDkQ8QSV5 v+qDQ/ojMi3xYL8lapig2KcWrq2gDSY= X-Google-Smtp-Source: ADUXVKLu7sCJhgFgD0oSzX1axN72CKZRd3gpBaAAlvbPWD3P/RFaFKw/rM0MbQvaJTqCuwuSiCsALg== X-Received: by 2002:a2e:808a:: with SMTP id i10-v6mr6581663ljg.67.1527445533642; Sun, 27 May 2018 11:25:33 -0700 (PDT) Received: from [192.168.0.19] (83-95-188-15-cable.dk.customer.tdc.net. [83.95.188.15]) by smtp.gmail.com with ESMTPSA id 23-v6sm6527320lfw.64.2018.05.27.11.25.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 May 2018 11:25:32 -0700 (PDT) From: =?utf-8?Q?Jesper_Steen_M=C3=B8ller?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Groovy 3 release Date: Sun, 27 May 2018 20:25:30 +0200 References: <54edd56eadaa8508d9b7989cd1227bc0cf41d85e.camel@winder.org.uk> <21BEA352-96C1-4B6A-B07A-46D0FC30B9CE@selskabet.org> <1527421033164-0.post@n5.nabble.com> <710AD0C4-BA73-4C7F-A37A-FA7EC92A812F@selskabet.org> <1527425079378-0.post@n5.nabble.com> To: dev@groovy.apache.org In-Reply-To: <1527425079378-0.post@n5.nabble.com> Message-Id: <3A048511-18B6-470B-8834-326A8495EDB3@selskabet.org> X-Mailer: Apple Mail (2.3273) On 27 May 2018, at 14.44, Daniel.Sun wrote: >=20 > Native lambda is only available on master branch, and it is only be = enabled > under static compilation. >=20 I had a chance to examine the current implementation. It uses a = LambdaMetafactory to bootstrap (i.e. generate inner class) access to the = doCall of the generated lambda/closure object. That means TWO classes = per lambda definition (in use), and two objects generated at every = lambda use. I haven't made any benchmarks, but we should be able to do = better: 1) Don't distinguish between lambdas and closures. 2) If the closure's instantiation is targeting a functional interface, = add the expected identified functional interface to the closure class, = and implement that in the closure class (bridging the single interface = method into the doClass) call. 3) If using compilestatic, we don't need any type conversions to match = the callee. -Jesper