고래밥 이야기
python_%timeit 본문
Built-in magic commands — IPython 8.6.0 documentation
Built-in magic commands — IPython 8.6.0 documentation
‘gtk3’, ‘gtk4’, ‘inline’, ‘ipympl’, ‘nbagg’, ‘notebook’, ‘osx’, ‘pdf’, ‘ps’, ‘qt’, ‘qt4’, ‘qt5’, ‘qt6’, ‘svg’, ‘tk’, ‘webagg’, ‘widget’, ‘wx’). If given, the corresponding matplotlib b
ipython.readthedocs.io
%timeit [-n<N> -r<R> [-t|-c] -q -p<P> -o] statement
-n<N>: execute the given statement <N> times in a loop. If <N> is not provided, <N> is determined so as to get sufficient accuracy.
-r<R>: number of repeats <R>, each consisting of <N> loops, and take the best result.
-t : use time.time to measure the time, which is the default on Unix. This function measures wall time.
-c : use time.clock to measure the time, which is the default on Windows and measures wall time. On Unix, resource.getrusage is used instead and returns the CPU user time.
-p<P> : use a precision of <P> digits to display the timing result. Default: 3
-q : Quiet, do not print result.
ex) %timeit -r 100 -n 10 function(x,y)
'잡다 > 잡다 그 잡채' 카테고리의 다른 글
Python_class (0) | 2022.11.09 |
---|---|
Python_def (0) | 2022.11.09 |
Python_inner product (1) | 2022.11.09 |
Python_module (0) | 2022.11.09 |
Python_The import system (0) | 2022.11.09 |