neilconway opened a new pull request, #26023:
URL: https://github.com/apache/datafusion/pull/26023

   ## Which issue does this PR close?
   
   - N/A
   
   ## Rationale for this change
   
   #22655 added `decimal` support to `gcd` and `lcm`, but along the way, it 
switched the integer-path `lcm` from `unsigned_gcd` to `gcd_helper`. That 
switch wasn't necessary and costs performance: `unsigned_gcd` only works for 
integers but it is significantly faster.
   
   Benchmarks: (M4 Max)
   
         lcm both array   1.541 ms -> 1.084 ms   (-29.7%)
   
   ## What changes are included in this PR?
   
   * Fix perf regression in integer-path `lcm`
   * Simplify `gcd_helper` signature
   * Fix bug in `gcd` and `lcm` benchmarks: they generated data using a fixed 
seed, which resulted in benchmarking `gcd(x, x)` and `lcd(x, x)`. These are 
both trivial cases.
   
   ## What is the testing strategy for this PR?
   
   Existing tests pass.
   
   ## Are there any user-facing changes?
   
   No.
   


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