andygrove opened a new pull request, #4911:
URL: https://github.com/apache/datafusion-comet/pull/4911

   > This PR was created by an LLM as a draft PR. I will mark it as ready for 
review after human review.
   
   
   ## Which issue does this PR close?
   
   N/A — autonomous exploratory PR.
   
   ## Rationale for this change
   
   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.
   
   ## 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?
   
   Correctness: unit tests + seeded differential fuzz (bit-identical Arrow 
output vs `main`).
   
   Benchmark (criterion):
   
   - spark_floor_ float64: 10.548% faster (base 1525ns -> cand 1364ns)
   - spark_floor_ decimal128(38,6) wide values: 3.043% faster (base 38997ns -> 
cand 37810ns)
   - spark_floor_ decimal128(38,2): 69.852% faster (base 25462ns -> cand 7676ns)
   - spark_floor_ decimal128(38,18): 75.222% faster (base 28693ns -> cand 
7109ns)
   
   Full criterion output:
   
   ```text
   spark_floor: decimal128(38,2)
                           time:   [7.6379 µs 7.6620 µs 7.6869 µs]
                           change: [−69.961% −69.852% −69.739%] (p = 0.00 < 
0.05)
                           Performance has improved.
   
   spark_floor: decimal128(38,18)
                           time:   [7.0976 µs 7.1216 µs 7.1451 µs]
                           change: [−75.295% −75.222% −75.141%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 1 outliers among 100 measurements (1.00%)
     1 (1.00%) low mild
   
   spark_floor: decimal128(38,6) wide values
                           time:   [37.480 µs 37.607 µs 37.739 µs]
                           change: [−3.4647% −3.0427% −2.6266%] (p = 0.00 < 
0.05)
                           Performance has improved.
   
   spark_floor: float64    time:   [1.3466 µs 1.3669 µs 1.3899 µs]
                           change: [−12.450% −10.548% −8.3898%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 12 outliers among 100 measurements (12.00%)
     7 (7.00%) high mild
     5 (5.00%) high severe
   ```
   
   
   


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