1 | initial version |
If the goal is a script to factor integers and you need speed, look into using a specialised number theory library directly, such as FLINT, NTL or PARI/GP.
It's probably overkill to start Sage just for that.
2 | No.2 Revision |
If the goal is a script to factor integers and you need speed, look into using a specialised number theory library directly, such as FLINT, NTL or PARI/GP.
It's probably overkill to start Sage just for that.
Or as an intermediate solution, use SymPy, e.g. run this in a shell:
$ python3 -c "from sympy import factorint ; print(factorint(100))"
{2: 2, 5: 2}