You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/01/12 02:31:48 UTC

[GitHub] [rocketmq] areyouok commented on pull request #3588: [ISSUE 3585] [Part B] Improve encode/decode performance

areyouok commented on pull request #3588:
URL: https://github.com/apache/rocketmq/pull/3588#issuecomment-1010569771


   > In request or response header, some `Integer` fields(queueId, sysFlag, etc) are assigned by `java.lang.Integer#parseInt(java.lang.String)`. Is it more appropriate to use `java.lang.Integer#valueOf(java.lang.String)` to prevent auto-boxing? `valueOf()` will use `IntegerCache`, but the behavior of auto-boxing depends on the implementation of compiler.
   
   The java 8 compiler use Integer.valueOf(Integer) for auto-boxing, frequently requested values is caching.
   
   By the way, the rocketmq header objects should use primitive types, but I do not change this time.
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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