Tips¶
cProfile
(implemented in C) is preferred overprofile
(implemented in Python).The profiler modules (
cProfile
andprofile
) and tools based on them (e.g.,%prun
and%%prun
for notebook) are designed to provide an execution profile for a given program, not for benchmarking purposes (for that, there istime