jamesfredley commented on PR #2374: URL: https://github.com/apache/groovy/pull/2374#issuecomment-3827499847
**Test Date:** January 30, 2026 **Runs per Configuration:** 3 **Environment:** Windows 11, Java 17.0.18, 4GB heap, 20 CPUs --- ## Master Comparison Table All values are **averages across 3 runs**. Times in milliseconds unless noted. **Bold** indicates best performance. ### Loop Benchmarks (ComprehensiveBenchmark) | Benchmark | NO-INDY | Optimized-INDY | Baseline-INDY | |-----------|---------|----------------|---------------| | Loop: each + toString | 33.09 ms | 33.23 ms | **32.70 ms** | | Loop: collect | 52.62 ms | **52.22 ms** | 54.59 ms | | Loop: findAll | **113.08 ms** | 116.15 ms | 114.58 ms | --- ### Method Invocation Benchmarks (ComprehensiveBenchmark) | Benchmark | NO-INDY | Optimized-INDY | Baseline-INDY | |-----------|---------|----------------|---------------| | Method: simple instance | 8.77 ms | **8.55 ms** | 8.94 ms | | Method: with params | **10.00 ms** | 10.08 ms | 10.52 ms | | Method: static | 9.19 ms | **7.73 ms** | 8.25 ms | | Method: polymorphic | **163.35 ms** | 1.70 s | 1.88 s | --- ### Closure Benchmarks (ComprehensiveBenchmark) | Benchmark | NO-INDY | Optimized-INDY | Baseline-INDY | |-----------|---------|----------------|---------------| | Closure: creation + call | **21.45 ms** | 24.89 ms | 24.54 ms | | Closure: reused | 19.44 ms | 19.86 ms | **18.59 ms** | | Closure: nested | 39.25 ms | **37.51 ms** | 38.22 ms | | Closure: curried | **154.37 ms** | 159.80 ms | 161.86 ms | --- ### Other Benchmarks (ComprehensiveBenchmark) | Benchmark | NO-INDY | Optimized-INDY | Baseline-INDY | |-----------|---------|----------------|---------------| | Property: read/write | 20.80 ms | **18.70 ms** | 19.33 ms | | Collection: each | 108.71 ms | **107.19 ms** | 110.03 ms | | Collection: collect | 121.07 ms | **116.21 ms** | 121.74 ms | | Collection: inject | **127.13 ms** | 132.85 ms | 139.18 ms | | GString: simple | **101.22 ms** | 102.89 ms | 105.09 ms | | GString: multi-value | **112.55 ms** | 116.85 ms | 117.61 ms | --- ### Method Invocation Benchmarks (MethodInvocationBenchmark) | Benchmark | NO-INDY | Optimized-INDY | Baseline-INDY | |-----------|---------|----------------|---------------| | Simple instance method | 7.23 ms | **6.59 ms** | 8.22 ms | | Method with parameters | **7.76 ms** | 8.08 ms | 8.31 ms | | Method with object param | 11.41 ms | **10.74 ms** | 11.10 ms | | Static method | **1.24 ms** | 3.47 ms | 3.40 ms | | Static method with params | **1.17 ms** | 7.75 ms | 8.11 ms | | Monomorphic call site | **46.89 ms** | 130.65 ms | 126.87 ms | | Polymorphic call site | **382.26 ms** | 3.52 s | 3.85 s | | Interface method | 6.34 ms | 3.53 ms | **3.42 ms** | | Dynamic typed calls | 5.86 ms | **3.04 ms** | 3.18 ms | | Property access | 27.52 ms | **21.49 ms** | 22.58 ms | | Method reference | 34.40 ms | **31.01 ms** | 31.25 ms | | GString method | **190.04 ms** | 193.28 ms | 194.07 ms | --- ### Closure Benchmarks (ClosureBenchmark) | Benchmark | NO-INDY | Optimized-INDY | Baseline-INDY | |-----------|---------|----------------|---------------| | Simple closure creation | 32.52 ms | **30.21 ms** | 31.72 ms | | Closure reuse | 22.79 ms | **19.86 ms** | 21.15 ms | | Multi-param closure | 39.00 ms | **38.34 ms** | 39.22 ms | | Closure with capture | 23.19 ms | **19.94 ms** | 20.34 ms | | Closure modify capture | 14.30 ms | **12.55 ms** | 13.45 ms | | Closure delegation | 40.33 ms | **27.24 ms** | 31.99 ms | | Nested closures | 59.92 ms | **56.24 ms** | 59.72 ms | | Curried closure | 291.59 ms | 296.21 ms | **289.39 ms** | | Right curried closure | 188.59 ms | **187.98 ms** | 189.34 ms | | Closure composition | 64.37 ms | **57.93 ms** | 59.37 ms | | Closure as parameter | 42.64 ms | **40.58 ms** | 41.48 ms | | Closure spread | **177.89 ms** | 2.10 s | 2.10 s | | Closure.call() | 25.69 ms | **22.22 ms** | 25.49 ms | | Closure trampoline | 55.88 ms | **50.72 ms** | 55.22 ms | | each with closure | 28.55 ms | **26.44 ms** | 28.72 ms | | collect with closure | 27.95 ms | **26.13 ms** | 28.00 ms | | findAll with closure | **35.72 ms** | 37.14 ms | 42.34 ms | | inject with closure | 33.69 ms | **33.41 ms** | 36.29 ms | --- ### Loop Benchmarks (LoopsBenchmark) | Benchmark | NO-INDY | Optimized-INDY | Baseline-INDY | |-----------|---------|----------------|---------------| | Original: each + toString | **43.65 ms** | 45.55 ms | 45.90 ms | | Simple: each only | **38.93 ms** | 42.03 ms | 42.67 ms | | Closure call | 22.63 ms | **19.77 ms** | 21.99 ms | | Method call | 8.14 ms | 6.22 ms | **5.39 ms** | | Nested loops | **70.82 ms** | 72.94 ms | 77.47 ms | | Loop with collect | **89.20 ms** | 90.26 ms | 90.67 ms | | Loop with findAll | 209.40 ms | **204.75 ms** | 209.98 ms | --- ### Call Site Invalidation (Critical for GROOVY-10307) | Metric | NO-INDY | Optimized-INDY | Baseline-INDY | |--------|---------|----------------|---------------| | Metaclass change ratio | **1.27x** | 69.4x | 102.6x | | Baseline time (no changes) | 6.83 ms | 7.44 ms | **5.18 ms** | | With changes time | **8.51 ms** | 439.54 ms | 531.72 ms | --- ## Summary Table: Key Metrics | Metric | NO-INDY | Optimized-INDY | Baseline-INDY | |--------|---------|----------------|---------------| | Polymorphic call site | **382 ms** | 3.52 s | 3.85 s | | Metaclass change ratio | **1.27x** | 69.4x | 102.6x | | Static method | **1.24 ms** | 3.47 ms | 3.40 ms | | Monomorphic call site | **46.89 ms** | 130.65 ms | 126.87 ms | | Closure spread | **178 ms** | 2.10 s | 2.10 s | | Simple instance method | 7.23 ms | **6.59 ms** | 8.22 ms | | Closure delegation | 40.33 ms | **27.24 ms** | 31.99 ms | | Property access | 27.52 ms | **21.49 ms** | 22.58 ms | | Interface method | 6.34 ms | 3.53 ms | **3.42 ms** | | Dynamic typed calls | 5.86 ms | **3.04 ms** | 3.18 ms | --- -- 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]
