> I look for the command allowing to have the time of execution of a
> command in sage
sage: timeit?
...
Docstring:
Time execution of a command or block of commands. Displays the
best WALL TIME for execution of the given code. This is
based on
the Python timeit module, which avoids a number of common traps
for measuring execution times. It is also based on IPython's
%timeout command.
TYPICAL INPUT FORMAT:
timeit(statement, preparse=None, number=0, repeat=3,
precision=3)
EXAMPLES:
sage: timeit('2^10000')
625 loops, best of 3: ... per loop
...
--
Kevin Horton
Ottawa, Canada
Also, use the "time" command, e.g.,
sage: time 2+2
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
4
sage:
william
One nice trick: If you're in the notebook and you put
%time
as the first line of a notebook cell, then the entire block of code is timed.
William