gengliangwang commented on PR #56258:
URL: https://github.com/apache/spark/pull/56258#issuecomment-4616587301

   On reflection, this PR doesn't meet the bar set out in the 
[SPARK-56908](https://issues.apache.org/jira/browse/SPARK-56908) scope 
guidance, so I'm withdrawing it.
   
   It's a source-only dead-branch elimination: for a non-null literal list 
element, `if (x.isNull) { ... } else if (...)` becomes `if (false) { ... } else 
if (...)`, and Janino constant-folds `if (false)` — so the bytecode is 
unchanged. The dead branch sets an `iconst` (`HAS_NULL = -1`), not a 
constant-pool entry, and the literal it reads is already used in the live 
equality branch, so nothing is removed from `references[]` / the constant pool. 
The pattern is frequent (~348× across the TPC-DS whole-stage codegen), but per 
the measured data even ×358–445 source-only patterns saved compile time below 
the ~0.7% run-to-run noise floor.
   
   So it adds codegen-logic branching for a benefit below measurement noise, 
with no bytecode / constant-pool change — exactly the case the scope guidance 
says to avoid. Closing.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to