alignedalignof / py-bligint

DIY Python bigint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

py-bligint

Program to test algorithmical complexities of big integer arithmetic. Specifically, measures the time to raise a large integer to some power.

Multiplication Number Time, s
Halfwise 9876543210987654321^200 111
Karatsuba 9876543210987654321^200 61.5
Digitwise + cache 9876543210987654321^600 20.3
Py native 9876543210987654321^20000 1.28

Unsuprisingly built-in native big integer performance is exceedingly greater than anything written in pure Python. What is interesting, digitwise multiplication with a straightforward caching mechanism performed well.

About

DIY Python bigint

License:GNU General Public License v3.0


Languages

Language:Python 100.0%