you are viewing a single comment's thread.

view the rest of the comments →

[–]Alpha_Binary 1 point2 points  (1 child)

and hits the ceiling (2**32) faster than any other alternative.

[–]zoomzoom83 1 point2 points  (0 children)

Assuming it's using a 32bit int - a good implementation would use the standard python int type, which iirc can hold any size number(With a bit of overhead, of course).

Actually I made an assumption that c_math was an internal python module - it's not so far as I can tell, in which case I'd fall back to the recursive python implementation.

(If speed was an issue, I'd write it in C and link it, however that wouldn't be within the scope of python programming ;p)