jamesfredley commented on PR #2374: URL: https://github.com/apache/groovy/pull/2374#issuecomment-4004854328
These changes significantly improve https://github.com/jamesfredley/grails7-performance-regression results on Groovy 4, but these changes were not positive on Groovy 6 (master) which has already had dozens of indy related changes. I have created a PR to backport the JMH benchmarks from master to 4: https://github.com/apache/groovy/pull/2393 When I ran these benchmarks against Groovy 4 with and without this PR: What improved: Benchmarks with metaclass churn - burstThenSteadyState (-64%), multiClassStartupThenSteadyState (-61%), invalidation benchmarks (-6% to -20%). These are scenarios where SwitchPoint invalidation is the bottleneck. What regressed: Steady-state benchmarks where no invalidation happens - baselineHotLoop (+17%), baselineListSize (+16%), baselineCollectionClosureChain (+17%), baselineProjectMetrics (+17%). The call site registry overhead hurts when there's nothing to invalidate. This matches the pattern: disabling SwitchPoint helps during metaclass churn but adds overhead on the normal hot path. Whether it's net positive depends on workload mix and how much JIT warmup you give it. https://github.com/jamesfredley/grails7-performance-regression showed a 2x improvement, but the JMH tests show a less positive picture. The grails performance test did not appear to allow for consistent or full JIT warmup. I am now not sure that this PR is a good idea for Groovy 4 overall. Maybe only as non-default and enabled with a flag that Grails 7 would use, but Grails 7 EOL is June 30th, so I am not sure that is worth the effort. `groovy.indy.switchpoint.guard=true by default` -- 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]
