perf: optimize spark_floor (up to 4x faster)#4911
Conversation
spark_floor (up to 4x faster)
…datafusion-comet-20260713-114953 # Conflicts: # native/spark-expr/Cargo.toml
|
Both this and #4926 edit the shared Suggested change: land one mechanism and apply it to both. The |
Which issue does this PR close?
N/A
Rationale for this change
Optimize an existing expression.
What changes are included in this PR?
Decimal floor now monomorphizes the per-element op (was &dyn Fn) and dispatches on input scale to a const divisor with an i64 fast path, so the per-row 128-bit __divti3 division libcall becomes a multiply-and-shift.
How are these changes tested?
Existing tests.
Benchmark (criterion):
Full criterion output: