rich7420 commented on PR #11137:
URL: https://github.com/apache/ozone/pull/11137#issuecomment-5450997629

   Quick JMH check of `HeapEntry.compareTo` (before = comparator built per 
call, after = hoisted static), JDK 21:
   
   ```
     perCall (before)   7.6 ns/op   56 B/op
     hoisted (after)    1.4 ns/op    ~0 B/op
   ```
   
   JIT escape analysis does not remove the per-call comparator, so the hoist is 
real: ~56 B/op eliminated and ~5x faster per compare. Small in absolute terms 
(a few compares per listed entry), but not a no-op. Standalone JMH, not part of 
the PR.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to