jasonk000 commented on pull request #11721:
URL: https://github.com/apache/kafka/pull/11721#issuecomment-1025992223


   Overall, this results in ~6% reduction in CPU cycles in the `send()` path.
   
   Before flamegraph (see highlighted section) - starting from `send()`
   
![image](https://user-images.githubusercontent.com/3196528/151834271-4a9c82e1-05b5-4d28-ab5c-7e1a67e8c8ca.png)
   
   Before flamegraph (see highlighted) - zoomed in to the `tryAppend()`
   
![image](https://user-images.githubusercontent.com/3196528/151834480-34ef1518-daa9-4ea7-be99-faeddeacab2e.png)
   
   After flamegraph (highlight turned on, but not showing up in any samples)
   
![image](https://user-images.githubusercontent.com/3196528/151834568-23f65fd5-16fc-44bd-9ddf-816851f9174e.png)
   
   For the provided JMH microbenchmark, the new approach is ~3.4x better.
   ```
   Benchmark                                                  Mode  Cnt    
Score   Error   Units
   ByteUtilsBenchmark.testSizeOfUnsignedVarint               thrpt    5  
295.128 ± 7.481  ops/ms
   ByteUtilsBenchmark.testSizeOfUnsignedVarintOriginal       thrpt    5   
87.954 ± 2.671  ops/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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to