jamesfredley commented on PR #2374:
URL: https://github.com/apache/groovy/pull/2374#issuecomment-3821751910

   ### Optimizations Retained
   
   1. **Disabled Global SwitchPoint Guard** (Selector.java)
      - Removed the global SwitchPoint that caused ALL call sites to invalidate 
when ANY metaclass changed
      - Can be re-enabled with: `-Dgroovy.indy.switchpoint.guard=true`
   
   2. **Call Site Cache Invalidation** (IndyInterface.java, 
CacheableCallSite.java)
      - Implemented call site registration mechanism (`ALL_CALL_SITES` set with 
weak references)
      - When metaclass changes, all registered call sites have their caches 
cleared
      - Targets reset to default (fromCache) path, ensuring metaclass changes 
are visible
   
   ### Optimizations Removed (No Measurable Benefit)
   
   1. **Monomorphic Fast-Path** - `latestClassName`/`latestMethodHandleWrapper` 
volatile fields
   2. **Optimized Cache Operations** - `get()`, `putIfAbsent()` methods
   3. **Pre-Guard Method Handle Storage** - `handleBeforeArgGuards`, 
`directMethodHandle` fields
   
   Testing showed these additional optimizations provide **no measurable 
performance benefit** in the Grails 7 benchmark while adding complexity.


-- 
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