Ask Your Question
2

execution time

asked 7 years ago

santoshi gravatar image

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

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

Preview: (hide)
link

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

Stats

Asked: 7 years ago

Seen: 749 times

Last updated: Jan 27 '18