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
1 - CPU times can be subdivided into several times, if you don't know exactly how CPU time was subdivided you should use wall time aka Elapsed real-time.
2 - They can be many reasons for the huge gap: CPU time contains: Idle time, waiting  time for systems resources to be available, etc... whereas wall time if only : finish date - starting date
Problem about cpu time and wall time in jupyternotebook