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
下载
关闭预览

相关内容

专知会员服务
17+阅读 · 2020年9月6日
【经典书】C语言傻瓜式入门(第二版),411页pdf
专知会员服务
51+阅读 · 2020年8月16日
【机器学习术语宝典】机器学习中英文术语表
专知会员服务
59+阅读 · 2020年7月12日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
分布式并行架构Ray介绍
CreateAMind
9+阅读 · 2019年8月9日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
RL 真经
CreateAMind
5+阅读 · 2018年12月28日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
14+阅读 · 2017年11月16日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
0+阅读 · 2021年1月15日
Arxiv
0+阅读 · 2021年1月14日
Arxiv
0+阅读 · 2021年1月14日
Meta-Learning with Implicit Gradients
Arxiv
13+阅读 · 2019年9月10日
Viewpoint Estimation-Insights & Model
Arxiv
3+阅读 · 2018年7月3日
VIP会员
相关VIP内容
专知会员服务
17+阅读 · 2020年9月6日
【经典书】C语言傻瓜式入门(第二版),411页pdf
专知会员服务
51+阅读 · 2020年8月16日
【机器学习术语宝典】机器学习中英文术语表
专知会员服务
59+阅读 · 2020年7月12日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
相关资讯
分布式并行架构Ray介绍
CreateAMind
9+阅读 · 2019年8月9日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
RL 真经
CreateAMind
5+阅读 · 2018年12月28日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
14+阅读 · 2017年11月16日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员