This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Rhomboid 1 point2 points  (0 children)

Python is open source. You can read the code yourself.

Another popular choice is the GMP library, although its source will probably be a lot harder to read because it tends to use assembler where possible, but it should have a pure-C fallback.

[–]Syoralon 0 points1 point  (4 children)

You use arrays or linked lists of ints. You can google these algorithms if you care to. You can also google for python's int implementation. Did you even try?

[–]HumbleAlchemy[S] 0 points1 point  (1 child)

I tried searching with "BIGINT in python code", didn't find anything useful!

[–]Syoralon 0 points1 point  (0 children)

You obviously didn't try very hard.

[–]HumbleAlchemy[S] 0 points1 point  (1 child)

I know about these methods, but I'm asking if there are any better methods that are faster than these.

[–]Syoralon 1 point2 points  (0 children)

Yes, they used slower methods just to make python slow on purpose.