Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19937#discussion_r155927018
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
 ---
    @@ -617,6 +619,7 @@ case class SortMergeJoinExec(
     
         s"""
            |while (findNextInnerJoinRows($leftInput, $rightInput)) {
    +       |  ${leftVarDecl.mkString("\n")}
    --- End diff --
    
    Since they are local variable, it takes almost no cost. If they are on CPU 
registers, there is no cost. If they are in stack frame, it is up to one 
instruction to increase or decrease stack frame size.
    
    WDYT? Did you see huge overhead to create and destroy local variables?


---

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

Reply via email to