You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "neilconway (via GitHub)" <gi...@apache.org> on 2026/10/04 13:04:04 UTC

[PR] perf: Fix perf regression in `lcm` [datafusion]

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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: Fix perf regression in `lcm` [datafusion]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #26023:
URL: https://github.com/apache/datafusion/pull/26023#issuecomment-5980481746

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/26023?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 82.65%. Comparing base ([`b2cfc23`](https://app.codecov.io/gh/apache/datafusion/commit/b2cfc23ad4cab1fd00b6e56d5a1dee84f70d111d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`bbf3378`](https://app.codecov.io/gh/apache/datafusion/commit/bbf33783cc12a110a9b31f781729c3dd361ba4cf?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 3 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff            @@
   ##             main   #26023    +/-   ##
   ========================================
     Coverage   82.64%   82.65%            
   ========================================
     Files        1147     1147            
     Lines      445883   446087   +204     
     Branches   445883   446087   +204     
   ========================================
   + Hits       368519   368700   +181     
   - Misses      54977    54998    +21     
   - Partials    22387    22389     +2     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/26023?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: Fix perf regression in `lcm` [datafusion]

Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on PR #26023:
URL: https://github.com/apache/datafusion/pull/26023#issuecomment-5980243790

   FYI @Jefffrey @theirix 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] perf: Fix perf regression in `lcm` [datafusion]

Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway merged PR #26023:
URL: https://github.com/apache/datafusion/pull/26023


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org