Skip to main content
QUICK REVIEW

[Paper Review] Documentation for the ratpoints program

Michael Stoll|arXiv (Cornell University)|Mar 21, 2008
Advanced Numerical Analysis Techniques3 citations
TL;DR

This paper presents ratpoints, a highly optimized C program for computing all rational points on a hyperelliptic curve up to a given height bound. It uses quadratic sieving with bit-level parallelism and multi-precision arithmetic, achieving up to 2x speedup via 256-bit AVX registers, making it one of the most efficient tools for enumerating rational points on curves.

ABSTRACT

This note explains how to obtain, install, and use the ratpoints program. The program finds rational points up to a specified height on hyperelliptic curves using a highly optimized quadratic sieving algorithm.

Motivation & Objective

  • To develop an efficient algorithm for computing all rational points on a hyperelliptic curve within a specified height bound.
  • To optimize performance by minimizing expensive operations like integer division through bit manipulation and shift-based arithmetic.
  • To support large-degree polynomials (up to degree 100) and arbitrary-precision coefficients using the GMP library.
  • To leverage modern CPU instruction sets (SSE, AVX) for parallel bit-level operations to accelerate sieving.
  • To provide a robust, extensible, and freely available open-source tool for number theorists and arithmetic geometry researchers.

Proposed method

  • Employs quadratic sieving to efficiently eliminate candidate denominators by checking local solubility modulo small primes.
  • Uses bit arrays to store sieving information, replacing slower char arrays for compact and fast operations.
  • Applies multi-precision arithmetic via the GMP library to ensure exact point verification and handle large coefficients.
  • Implements prime selection based on expected success rate to reduce unnecessary computations.
  • Uses 128-bit (SSE) and 256-bit (AVX) registers for parallel processing of bitfields during sieving, significantly improving throughput.
  • Applies transformations such as polynomial reversal to improve sieving efficiency when the reversed curve yields better filtering.

Experimental results

Research questions

  • RQ1How can the enumeration of rational points on hyperelliptic curves be made more efficient for large height bounds?
  • RQ2What optimizations in low-level arithmetic and memory access patterns can significantly reduce the computational cost of rational point search?
  • RQ3To what extent can modern CPU instruction sets (SSE, AVX) accelerate bit-level sieving in number-theoretic algorithms?
  • RQ4How does the performance of the ratpoints algorithm scale with increasing curve degree and coefficient size?
  • RQ5What role does polynomial reversal play in improving the effectiveness of the sieving process for non-monic or poorly conditioned curves?

Key findings

  • The ratpoints program achieves up to a 2x speedup in performance when using 256-bit AVX registers compared to the previous 128-bit SSE version.
  • The use of 256-bit registers, enabled by AVX2 support, results in a substantial performance gain, especially on modern processors with wide vector units.
  • The integration of 256-bit operations required careful macro-based abstraction in rp-private.h to manage different word sizes and instruction sets.
  • The program now supports polynomials of degree up to 100, with the degree limit configurable via RATPOINTS_MAX_DEGREE in the header file.
  • The new version (2.2) includes performance improvements such as faster zero-checking on bit arrays and more efficient use of AVX/SSE registers during the first sieving phase.
  • The program maintains correctness and robustness through extensive testing, including regression checks via testbase and testbase2, and handles edge cases like non-monic leading coefficients with p-adic and Jacobi symbol conditions.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.