This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 31c6d24a21 rework benchmark to reflect current master defaults
31c6d24a21 is described below
commit 31c6d24a215c60f244d4cdc794f3b54f9b485df6
Author: Paul King <[email protected]>
AuthorDate: Sun Jul 12 07:13:09 2026 +1000
rework benchmark to reflect current master defaults
---
.../groovy/bench/DynamicDispatchColdBench.java | 16 ++++++++-------
.../groovy/bench/dispatch/CallsiteBench.java | 24 +++++++++++-----------
2 files changed, 21 insertions(+), 19 deletions(-)
diff --git
a/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/DynamicDispatchColdBench.java
b/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/DynamicDispatchColdBench.java
index 3fd1e66bbc..c42c81ec39 100644
---
a/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/DynamicDispatchColdBench.java
+++
b/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/DynamicDispatchColdBench.java
@@ -93,24 +93,26 @@ public class DynamicDispatchColdBench {
}
/**
- * As {@link #dynamicMono_groovy} but with the experimental reflective cold
- * tier enabled (GROOVY-12137): cold dispatch runs reflectively until
- * hit-count promotion, avoiding per-shape MethodHandle chain construction.
+ * As {@link #dynamicMono_groovy} but with the reflective cold tier
+ * explicitly disabled (GROOVY-12137). The tier is on by default, so the
+ * plain variant measures the shipping (enabled) cold path and this is the
+ * disabled baseline for the cold-dispatch A/B.
* @return the computed sum
*/
@Benchmark
- @Fork(value = 25, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=true")
+ @Fork(value = 25, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=false")
public int dynamicMono_groovyColdReflect() {
return new DynamicDispatchCold().monoSum(n);
}
/**
- * As {@link #dynamicPoly_groovy} but with the experimental reflective cold
- * tier enabled (GROOVY-12137).
+ * As {@link #dynamicPoly_groovy} but with the reflective cold tier
+ * explicitly disabled (GROOVY-12137) — the disabled baseline for the
+ * polymorphic cold-dispatch A/B (the tier is on by default).
* @return the computed sum
*/
@Benchmark
- @Fork(value = 25, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=true")
+ @Fork(value = 25, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=false")
public int dynamicPoly_groovyColdReflect() {
return new DynamicDispatchCold().polySum(n);
}
diff --git
a/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/dispatch/CallsiteBench.java
b/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/dispatch/CallsiteBench.java
index 70e5ca21e3..1a670bae1c 100644
---
a/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/dispatch/CallsiteBench.java
+++
b/subprojects/performance/src/jmh/groovy/org/apache/groovy/bench/dispatch/CallsiteBench.java
@@ -47,16 +47,16 @@ public class CallsiteBench {
}
/**
- * Monomorphic dispatch via Groovy dynamic with the experimental reflective
- * cold tier enabled (GROOVY-12137). Steady state must match
- * {@link #dispatch_1_monomorphic_groovy}: after hit-count promotion the
- * hot path is identical, so a sustained gap on the dashboards is a
- * regression signal for the cold tier.
+ * Monomorphic dispatch via Groovy dynamic with the reflective cold tier
+ * explicitly disabled (GROOVY-12137). The tier is on by default, so the
+ * plain {@link #dispatch_1_monomorphic_groovy} measures the shipping
+ * (enabled) behaviour and this variant is the disabled baseline; steady
+ * state must match either way (the hot path is identical after promotion).
* @param state the monomorphic receiver state
* @param bh the blackhole for consuming results
*/
@Benchmark
- @Fork(value = 2, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=true")
+ @Fork(value = 2, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=false")
public void dispatch_1_monomorphic_groovyColdReflect(MonomorphicState
state, Blackhole bh) {
Callsite.dispatch(state.receivers, bh);
}
@@ -92,16 +92,16 @@ public class CallsiteBench {
}
/**
- * Polymorphic dispatch (3 types) via Groovy dynamic with the experimental
- * reflective cold tier enabled (GROOVY-12137). Polymorphic sites never
- * reach the consecutive-hit promotion, so this exercises the per-wrapper
- * cumulative promotion; steady state must match
- * {@link #dispatch_3_polymorphic_groovy}.
+ * Polymorphic dispatch (3 types) via Groovy dynamic with the reflective
+ * cold tier explicitly disabled (GROOVY-12137) — the disabled baseline
+ * against the default-on {@link #dispatch_3_polymorphic_groovy}.
Polymorphic
+ * sites never reach the consecutive-hit promotion, so the enabled variant
+ * exercises the per-wrapper cumulative promotion; steady state must match.
* @param state the polymorphic receiver state
* @param bh the blackhole for consuming results
*/
@Benchmark
- @Fork(value = 2, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=true")
+ @Fork(value = 2, jvmArgsAppend = "-Dgroovy.indy.cold.reflection=false")
public void dispatch_3_polymorphic_groovyColdReflect(PolymorphicState
state, Blackhole bh) {
Callsite.dispatch(state.receivers, bh);
}