You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/09 23:04:41 UTC

[GitHub] [spark] mridulm commented on pull request #38182: [SPARK-40721][CORE] Use `||` instead of `|` in `TimSort`

mridulm commented on PR #38182:
URL: https://github.com/apache/spark/pull/38182#issuecomment-1272647395

   There is a reason to use `|` instead of `||` - you reduce chances of branch misprediction and minimize number of jumps - if the operations are really cheap.
   Having said that, I have not inspected the opcodes generated here - but I would assume that should hold.
   
   Note - this is typically used only for very performance sensitive code, where someone has gone to the trouble of actually ensuring the optimization actually gives the expected benefits.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org