How fast does your Python code run? Find out with timeit

preview_player
Показать описание
How fast does your Python code run? Python's standard library comes with "timeit", with which you can check your code's speed. But Jupyter comes with the "%timeit" and "%%timeit" magic commands, which make it super-easy to find out how long something takes. In this video, I demonstrate these two magic commands, and show you how to compare code speed.

And don't forget my free, weekly "Better developers" newsletter about Python and software engineering!
Рекомендации по теме
Комментарии
Автор

thanks sir, first time to understand these funcs

AhmedAli-kivx
Автор

I never knew about this function! So much better than the old perf_counter trick

OhsoLosoo
Автор

Amazing piece of knowledge

Hello Sir, will you make a video about "How to learn, use and know a new Python Module"
I always face trouble with a new Python Module, that is what is the structure of the module and how I can use the methods in it to solve my specific problems which I won't find in documentation and examples.
Simply how to be getting started with a new Python Module ater importing it in the project

avijitbanik