You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/05/31 09:53:44 UTC

[GitHub] [logging-log4j2] arturobernalg opened a new pull request #500: Use Math.max() or Math.min() instead of doing it manually

arturobernalg opened a new pull request #500:
URL: https://github.com/apache/logging-log4j2/pull/500


   


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

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



[GitHub] [logging-log4j2] rgoers commented on pull request #500: Use Math.max() or Math.min() instead of doing it manually

Posted by GitBox <gi...@apache.org>.
rgoers commented on pull request #500:
URL: https://github.com/apache/logging-log4j2/pull/500#issuecomment-851704246


   If I thought it was is easier or would result in a performance gain I wouldn't have asked the question.


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

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



[GitHub] [logging-log4j2] arturobernalg commented on pull request #500: Use Math.max() or Math.min() instead of doing it manually

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on pull request #500:
URL: https://github.com/apache/logging-log4j2/pull/500#issuecomment-851630497


   > What is the benefit of this change? The current code seems pretty clear and efficient.
   
   HI @rgoers 
   Don't you think it's more easy to read and understand when you see '`max`' o '`min`' ?
   any how the method is marked as @IntrinsicCandidate and I understand that the compiler will try to use this function when it find `mac.length >= 6 ? 6 : mac.length; `


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

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



[GitHub] [logging-log4j2] vy commented on pull request #500: Use Math.max() or Math.min() instead of doing it manually

Posted by GitBox <gi...@apache.org>.
vy commented on pull request #500:
URL: https://github.com/apache/logging-log4j2/pull/500#issuecomment-851889225


   @rgoers, from a performance perspective, I indeed don't expect any difference. This said, I agree with @arturobernalg on readability. If that is okay with you, I want to merge this.


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

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



[GitHub] [logging-log4j2] arturobernalg edited a comment on pull request #500: Use Math.max() or Math.min() instead of doing it manually

Posted by GitBox <gi...@apache.org>.
arturobernalg edited a comment on pull request #500:
URL: https://github.com/apache/logging-log4j2/pull/500#issuecomment-851630497


   > What is the benefit of this change? The current code seems pretty clear and efficient.
   
   HI @rgoers 
   Don't you think it's more easy to read and understand when you see '`max`' o '`min`' ?
   any how the method is marked as @IntrinsicCandidate and I understand that the compiler will try to use this function when it find `mac.length >= 6 ? 6 : mac.length; `
   TY


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

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



[GitHub] [logging-log4j2] vy merged pull request #500: Use Math.max() or Math.min() instead of doing it manually

Posted by GitBox <gi...@apache.org>.
vy merged pull request #500:
URL: https://github.com/apache/logging-log4j2/pull/500


   


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

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



[GitHub] [logging-log4j2] rgoers commented on pull request #500: Use Math.max() or Math.min() instead of doing it manually

Posted by GitBox <gi...@apache.org>.
rgoers commented on pull request #500:
URL: https://github.com/apache/logging-log4j2/pull/500#issuecomment-851929320


   Unless code is really unreadable I really don't care about cosmetic changes. Gary loves to rename variables to me more "clear". To me, beauty is in the eye of the beholder. IOW, I would never veto a cosmetic change unless it will actually cause harm (which has been known to happen).


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

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