Speeding up decimal multiplication

Viktor Krapivensky
11/23/2020
cs.DS

Official code: shdown/decimal-multiplication-paper (7 stars, TeX, last commit 2021-02-25).

Abstract

Decimal multiplication is the task of multiplying two numbers in base $10^N.$ Specifically, we focus on the number-theoretic transform (NTT) family of algorithms. Using only portable techniques, we achieve a 3x-5x speedup over the mpdecimal library.

Show full abstract

In this paper we describe our implementation and discuss further possible optimizations. We also present a simple cache-efficient algorithm for in-place $2n \times n$ or $n \times 2n$ matrix transposition, the need for which arises in the "six-step algorithm" variation of the matrix Fourier algorithm, and which does not seem to be widely known. Another finding is that use of two prime moduli instead of three makes sense even considering the worst case of increasing the size of the input, and makes for simpler answer recovery.

View on arXivView PDF

Code Implementations(1)

70TeX, COct 28, 20205 years agoNOASSERTION

Similar Papers

Cite this paper

@article{krapivensky2020speeding,
  title  = {Speeding up decimal multiplication},
  author = {Viktor Krapivensky},
  year   = {2020},
  eprint = {2011.11524},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2011.11524}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2011.11524.svg)](https://codeofpaper.com/paper/2011.11524)

Discussion