Nov. 6, 2022, 12:32 p.m. | Reuven Lerner

Reuven Lerner www.youtube.com

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.

Jupyter notebooks for all of my videos are at https://github.com/reuven/youTube-notebooks.

And don't forget my free, weekly "Better developers" newsletter about Python …

check code easy jupyter library python speed standard video

Senior Machine Learning Engineer

@ GPTZero | Toronto, Canada

ML/AI Engineer / NLP Expert - Custom LLM Development (x/f/m)

@ HelloBetter | Remote

Doctoral Researcher (m/f/div) in Automated Processing of Bioimages

@ Leibniz Institute for Natural Product Research and Infection Biology (Leibniz-HKI) | Jena

Seeking Developers and Engineers for AI T-Shirt Generator Project

@ Chevon Hicks | Remote

Principal Data Architect - Azure & Big Data

@ MGM Resorts International | Home Office - US, NV

GN SONG MT Market Research Data Analyst 11

@ Accenture | Bengaluru, BDC7A