Skip to content

refactor DensePolynomial add #905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 20, 2025

Conversation

tcoratger
Copy link
Contributor

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

@tcoratger tcoratger requested review from a team as code owners December 15, 2024 23:22
@tcoratger tcoratger requested review from z-tech, Pratyush and mmagician and removed request for a team December 15, 2024 23:22
@Pratyush Pratyush requested a review from Copilot June 20, 2025 06:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the addition implementation for DensePolynomial by simplifying control flow with early returns and improving readability.

  • Implements early returns for zero polynomials.
  • Introduces a (longer, shorter) strategy to minimize redundancy when summing coefficients.
  • Utilizes the cfg_iter_mut! macro for in-place coefficient updates.
Comments suppressed due to low confidence (1)

poly/src/polynomial/univariate/dense.rs:309

  • Consider adding a comment that explains the behavior and purpose of the cfg_iter_mut! macro, so future maintainers can quickly understand its functionality.
        cfg_iter_mut!(result)

@Pratyush Pratyush enabled auto-merge June 20, 2025 06:03
@Pratyush Pratyush added this pull request to the merge queue Jun 20, 2025
auto-merge was automatically disabled June 20, 2025 06:27

Pull Request is not mergeable

Merged via the queue into arkworks-rs:master with commit df47f74 Jun 20, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants