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. 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.


翻译:十进制乘法是将两个数字乘以 $10 元基数。 具体地说, 我们专注于算法的数字理论变换( NTT) 组。 我们仅使用便携式技术, 就能在微小库中实现3x-5x加速 。 在本文中, 我们描述我们的执行情况, 并讨论进一步可能的优化。 我们还为本地的 $ 2 元 或 $ 2 元 的矩阵变换提供了一个简单的缓存效率算法, 其需要来自 Fourier 矩阵的“ 六步算法” 变换, 并且似乎还不是广为人知 。 另一个发现是, 使用两种正模( 3) 是合理的, 甚至考虑到增加输入规模的最糟糕的情况, 并且更简单地恢复答案 。

0
下载
关闭预览

相关内容

【机器学习术语宝典】机器学习中英文术语表
专知会员服务
61+阅读 · 2020年7月12日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
105+阅读 · 2019年10月9日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
0+阅读 · 2021年1月15日
VIP会员
相关VIP内容
【机器学习术语宝典】机器学习中英文术语表
专知会员服务
61+阅读 · 2020年7月12日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
105+阅读 · 2019年10月9日
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员