arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1707.01898cs.DScs.MS
收藏

自适应模幂方法与Python的Power Function

Adaptive Modular Exponentiation Methods v.s. Python's Power Function

Shiyu Ji, Kun Wan

摘要:

本文使用Python实现了两种有效的模幂运算方法:自适应m-ary方法和窗口大小为k的自适应滑动窗口方法,其中两个m都是根据指数的长度自适应选择的。我们还对这两种方法进行了基准测试。评估结果表明,与CPython和Pypy中的模幂函数的行业标准高效实现相比,对于大于3072位的指数,我们的算法可以减少1-5%的计算时间。

英文摘要:

In this paper we use Python to implement two efficient modular exponentiation methods: the adaptive m-ary method and the adaptive sliding-window method of window size k, where both m's are adaptively chosen based on the length of exponent. We also conduct the benchmark for both methods. Evaluation results show that compared to the industry-standard efficient implementations of modular power function in CPython and Pypy, our algorithms can reduce 1-5% computing time for exponents with more than 3072 bits.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑