Skip to content

Conversation

@Marvin-Beckmann
Copy link
Member

@Marvin-Beckmann Marvin-Beckmann commented Feb 25, 2025

Description

This PR implements the NTT for

  • Cyclic Modulus
  • Negacyclic Modulus
  • multiplication of PolynomialRingZq

Even though I included several optimisations I found, I did not manage to make the implication faster than direct multiplication using FLINT, where the multiplication is already very fast.
I included benchmarks and added an additional disclaimer in the comment of the NTT-multiplication that is is not slower.
I tested it for common parameter-sets that I have found.
I found that the overhead necessary for multithreading also exceeds the runtime of the multiplication, so this was not an option to reduce the runtime, but for future potential optimisations I kept the framework to enable multi-threading within the code-base.

Testing

  • I added basic working examples (possibly in doc-comment)
  • I triggered all possible errors in my test in every possible way
  • I included tests for all reasonable edge cases

Checklist:

  • I have performed a self-review of my own code
    • The code provides good readability and maintainability s.t. it fulfills best practices like talking code, modularity, ...
      • The chosen implementation is not more complex than it has to be
    • My code should work as intended and no side effects occur (e.g. memory leaks)
    • The doc comments fit our style guide
    • I have credited related sources if needed

Marvin-Beckmann and others added 30 commits February 5, 2025 15:32
@Marvin-Beckmann Marvin-Beckmann added enhancement📈 New feature performance⚡ This issue or PR should improve labels Feb 25, 2025
@Marvin-Beckmann Marvin-Beckmann self-assigned this Feb 25, 2025
@Marvin-Beckmann Marvin-Beckmann requested review from LPorzenheim and removed request for jnsiemer July 2, 2025 09:57
}
res
}

Copy link
Member

Choose a reason for hiding this comment

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

Tests missing for intt working correctly as well as different modulus (as in ntt)

Copy link
Member

@LPorzenheim LPorzenheim left a comment

Choose a reason for hiding this comment

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

Code looks correct when comparing with reference. Minor spelling mistakes and missing tests in intt, see comments.

@Marvin-Beckmann Marvin-Beckmann merged commit 7ec7883 into dev Oct 17, 2025
2 checks passed
@Marvin-Beckmann Marvin-Beckmann deleted the cyclotomic-polynomials branch October 17, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement📈 New feature performance⚡ This issue or PR should improve

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants