Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 7 years ago

tmonteil gravatar image

You can just use the %time magic:

sage: %time 12345678987654321.is_prime()
CPU times: user 0 ns, sys: 0 ns, total: 0 ns
Wall time: 32.9 ยตs
False

You can find moe sophisticated tools on the Profiling in Sage thematic tutorial