This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-dev-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 34cd1cc1 2026/07/12 23:53:19: Generated dev website from 
groovy-website@2f21ebf
34cd1cc1 is described below

commit 34cd1cc1d3db7f45a93a1529968c52021a3da4d7
Author: jenkins <[email protected]>
AuthorDate: Sun Jul 12 23:53:19 2026 +0000

    2026/07/12 23:53:19: Generated dev website from groovy-website@2f21ebf
---
 search/search-index.json |  2 +-
 wiki/GEP-27.html         | 19 ++++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/search/search-index.json b/search/search-index.json
index 27d0cb25..2e9f3c18 100644
--- a/search/search-index.json
+++ b/search/search-index.json
@@ -891,7 +891,7 @@
     {
         "id": "wiki/GEP-27.html",
         "title": "The Apache Groovy programming language - Developer docs - 
GEP-27",
-        "content": "The Apache Groovy programming language - Developer docs - 
GEP-27 Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky 
Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on 
GitHub Report issues in Jira Stack Overflow questions Slack Community You are 
using an outdated browser. Please upgrade your browser to improve your 
experience. Apache Groovy&trade; Learn Documentation Download Support 
Contribute Ecosystem Blog posts Socialize GE [...]
+        "content": "The Apache Groovy programming language - Developer docs - 
GEP-27 Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky 
Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on 
GitHub Report issues in Jira Stack Overflow questions Slack Community You are 
using an outdated browser. Please upgrade your browser to improve your 
experience. Apache Groovy&trade; Learn Documentation Download Support 
Contribute Ecosystem Blog posts Socialize GE [...]
         "url": "wiki/GEP-27.html",
         "site": "dev"
     },
diff --git a/wiki/GEP-27.html b/wiki/GEP-27.html
index d2128875..f45b8e69 100644
--- a/wiki/GEP-27.html
+++ b/wiki/GEP-27.html
@@ -854,7 +854,8 @@ by name with runtime overload selection and 
<strong>silently ignores</strong> a
 <code>PackedClosure</code> binds a fixed <code>MethodHandle</code> and 
<strong>rejects</strong> one. The two are worth <em>contract</em>-aligning
 (a shared "known-target, delegate-inert" marker and consistent delegate 
handling), and both could
 share the per-arity handle-selection primitive that default-parameter packing 
(see <em>Excluded and
-deferred features</em>) also needs. Their dispatch models differ enough, 
though — a fixed handle versus
+deferred features</em>) needs — the same mechanism that would close the 
remaining dynamic-dispatch
+throughput gap (see <em>Performance</em>). Their dispatch models differ 
enough, though — a fixed handle versus
 runtime overload selection — that fully merging them into one path is not a 
goal; this is tracked as a
 separate initiative.</p>
 </div>
@@ -1343,6 +1344,22 @@ closure: the typed hoisted body compiles statically, and 
the adapter reaches it
 naive shared adapter is ~7–9× slower; the shipped one is at parity under 
<code>@CompileStatic</code> and ~2×
 under dynamic compilation (so the dynamic path stays opt-in).</p>
 </li>
+<li>
+<p>Capturing closures (the common case, e.g. <code>{ it + base }</code>) used 
to pay an extra per-call cost — the
+adapter allocated an argument array prepending the captures on every 
invocation. Binding the captures
+into the handle once at construction removes that allocation (GROOVY-12151). 
Measured per <code>call()</code>
+against the generated closure class it replaces, a capturing closure improved 
from dynamic ~3.2× /
+<code>@CompileStatic</code> ~1.75× to dynamic ~1.9× / 
<code>@CompileStatic</code> ~0.78× (faster than a normal closure under
+<code>@CompileStatic</code>), matching the non-capturing figures above.</p>
+</li>
+<li>
+<p>The remaining ~2× dynamic gap is the argument-array spreader plus the 
dynamic MOP <code>call</code>→<code>doCall</code>
+selection (<code>PackedClosure</code> is not a <code>GeneratedClosure</code>) 
— no longer allocation. A typed per-arity
+<code>invokeExact</code> path would remove the spreader for the common 
<code>each</code>/<code>collect</code> arities: the <strong>same</strong>
+per-arity handle-selection primitive that default-parameter packing and the 
MethodClosure alignment
+need (see <em>Unify the two writers</em> and <em>Excluded and deferred 
features</em>), so that throughput work and
+those follow-ons build one shared mechanism.</p>
+</li>
 </ul>
 </div>
 </div>

Reply via email to