Ask Your Question

execution time

asked 2018-01-27 06:51:22 +0200

santoshi gravatar image

please tell me execution command so that i will obtained execution time of my code in microsecond.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-01-27 11:31:10 +0200

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

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-01-27 06:51:22 +0200

Seen: 684 times

Last updated: Jan 27 '18