1 | initial version |
I am not sure it is the fastest way, but this i already much faster:
sage: %timeit str(RealLazyField()(2^57885161))[0]
100 loops, best of 3: 11.1 ms per loop
(my laptop is slower than yours, since your timeit takes me 13.4 s per loop, so you should get a better timing).