Skip to content

NTT backend #12

Description

@cedoor

Summary

Add a backend-ntt feature flag that swaps the internal BE alias to Poulpy's NTT120 backend.

Background

Squid currently supports two backends, both FFT-based:

  • FFT64Ref (default) — portable scalar
  • FFT64Avx (--features backend-avx) — x86-64 with AVX2 + FMA

Both operate over floating-point and accumulate rounding error that must be budgeted into the noise analysis. Poulpy also ships an NTT120 backend that works over integers mod a prime — exact arithmetic, no rounding error — but squid does not expose it.

Work

  • Add a backend-ntt feature flag that sets crate::backend::BE to the NTT120 backend
  • Document the trade-offs: NTT is exact but requires specific prime moduli and may have different performance characteristics than FFT64
  • Follow the safe-defaults convention from conventions.mdc — FFT64Ref remains the default

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions