Fast basecases for arbitrary-size multiplication - Laboratoire d'informatique de l'X (LIX)
Pré-Publication, Document De Travail Année : 2025

Fast basecases for arbitrary-size multiplication

Résumé

Multiple precision libraries typically use assembly-optimized loops for basecase operations on variable-length operands. We consider the alternative of generating lookup tables with hardcoded routines for many fixed sizes, e.g. for all multiplications up to 16 by 8 words. On recent ARM64 and x86-64 CPUs, we demonstrate up to a 2x speedup over GMP for basecase-sized multiplication and a 20% speedup for Karatsubasized operands. We pay special attention to the computation of approximate products and demonstrate up to a 3x speedup over GMP/MPFR for floating-point multiplication.
Fichier principal
Vignette du fichier
mpn.pdf (324.65 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04861755 , version 1 (02-01-2025)

Identifiants

  • HAL Id : hal-04861755 , version 1

Citer

Albin Ahlbäck, Fredrik Johansson. Fast basecases for arbitrary-size multiplication. 2025. ⟨hal-04861755⟩
0 Consultations
0 Téléchargements

Partager

More