paulk-asert opened a new pull request, #2673:
URL: https://github.com/apache/groovy/pull/2673

   …ike)
   
   Behind the groovy.indy.cold.reflection flag (default: off), plain method 
calls dispatch reflectively while a call site is cold, deferring all 
MethodHandle chain construction — and its one-time LambdaForm creation cost — 
to hit-count promotion. The shared cold dispatcher has a single 
(Object[])Object shape for every call site, arity, and primitive pattern; 
promotion installs the unchanged full guarded chain, so the hot path is 
identical to master.
   
   Plain calls are public, non-static, non-category CachedMethods on public 
classes with a real receiver and no spread/safe-null/interceptor semantics; 
caller-sensitive targets (including unannotated caller-context-sensitive cases 
like object serialization, and interface selections resolving to sensitive 
implementations) stay on the full path. Selection reuses Selector's existing 
logic via a new selection-only hook; validity is re-checked per call with 
plain-Java equivalents of the chain's guards. A per-wrapper cumulative counter 
promotes polymorphic receiver shapes that the consecutive-hit counter never 
catches.
   
   Measured (deterministic class-load counters + fresh-JVM timing): ~2/3 of 
per-shape LambdaForm cost removed on cold dispatch workloads, 1.34-1.40x faster 
cold dispatch with many cold sites, steady state unchanged after promotion, 
MOP-heavy test subset (3437 tests) green with the flag on.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to