As a physics student, I have a questions I would like to ask you about program runtime.
I'm doing a small project about algorithm optimization, my toy code is written on jupyternotebook, but when I use %%time and %%timeit in cell to test cpu time and wall time of my code, I found the following results
CPU times: total: 2min 16s Wall time: 24.2s
The huge gap between these two times makes me wonder, my confusion is
- Which should I use as the standard to measure the speed of the algorithm, although I know that it is not reasonable to use python to measure the speed of the code
- Why the time gap between these looks so big?
Really looking forward to any insights from kind people on this issue