No video

How To FIND SLOW CODE In Python & OPTIMIZE IT (FT. cProfile)

  Рет қаралды 19,085

Indently

Indently

Күн бұрын

Today we will be discovering together how we can use cProfile to find slow code in our program, and thanks to this, we can also further optimize our slow code.
Docs: docs.python.or...
▶ Become job-ready with Python:
www.indently.io
▶ Follow me on Instagram:
/ indentlyreels

Пікірлер: 31
@zer0her058
@zer0her058 8 ай бұрын
3:23 😂 no way he called it that
@jp46614
@jp46614 6 ай бұрын
the what time???
@itsdarklikehell
@itsdarklikehell 6 ай бұрын
ah my favorite time of the day, let me get my lotion and tissues!
@dcknature
@dcknature Жыл бұрын
cProfile seems to be a rather helpful tool for development. As always thanks and 24-th 👍😉!
@ryzer9699
@ryzer9699 Жыл бұрын
Can you do a tut of how to protect python code and implant license's system to it? Or even provide me with some useful resources to learn from?, Btw great video. Thanks!
@JackSparrow-vh8zz
@JackSparrow-vh8zz Жыл бұрын
If you want to freeze your Python code to exe then pyinstaller works great
@maxcharacterlimitreache-
@maxcharacterlimitreache- Жыл бұрын
Your channel is a godsend for this knowledge snippets
@Indently
@Indently Жыл бұрын
Grazie bello :) Si sono mezzo Italiano, l'altro mezzo e' un mistero ahah
@GooogleGoglee
@GooogleGoglee Жыл бұрын
@@Indently Aahhh lo sapevo! Bravo! Bel canale Sei in Danimarca?
@Indently
@Indently Жыл бұрын
@@GooogleGoglee Si! Gia da 7 anni ormai :)
@GooogleGoglee
@GooogleGoglee Жыл бұрын
@@Indently hai fatto bene! 👍🏻👋🏻 congratulazioni, beato te! Avrei tante domande da farti ma purtroppo non è il posto giusto.
@yabool2001
@yabool2001 Жыл бұрын
That's great!
@ewerybody
@ewerybody Жыл бұрын
3:32 link is not in the description box :/ But before you post that answer from 10 years ago why not link the latest docs for the stuff?
@Indently
@Indently Жыл бұрын
That's a fair point, it was just faster to find on stack overflow than scrolling down half way through the documentation. But I've gone ahead and included it!
@ewerybody
@ewerybody Жыл бұрын
0:56 did you know that Python functions always return None if not explicitly told otherwise?
@Indently
@Indently Жыл бұрын
I think I was a bit zombified from all the recording I did that day ahah. Reminds me of the times I returned True if something was True and False if it wasn't.
@rivers.thr33
@rivers.thr33 Жыл бұрын
true, though sometimes i use it to mean "this returned None for a reason" instead of "this returns None always". ended up saving me some dev time when i found myself writing a "Null" class later
@cheezedoodles3447
@cheezedoodles3447 Жыл бұрын
hey! there's actually a better profiler called scalene, you should check it out
@Indently
@Indently Жыл бұрын
Thanks for the heads up! I will check it out!
@ewerybody
@ewerybody Жыл бұрын
its not built-in tho, right? :)
@csd4ni3l
@csd4ni3l Жыл бұрын
thank you
@cirklare
@cirklare Жыл бұрын
I think Cython (C python) Is a bit faster than normal python libs
@ewerybody
@ewerybody Жыл бұрын
Cython != Cpython
@ewerybody
@ewerybody Жыл бұрын
"Normal python libs" could also be compiled with cython. So this statement doesn't make much sense. You mean code compiled with cython might execute faster than when executed with default cpython? That might be true. cProfile is still useful.
@cirklare
@cirklare Жыл бұрын
@@ewerybody thank you, actually I used cython for one time
@cirklare
@cirklare Жыл бұрын
@@ewerybody I know, but I call it that way for no reason
@r3d570n3
@r3d570n3 6 ай бұрын
@OnlyKemal
@OnlyKemal Жыл бұрын
hi
Memoization: The TRUE Way To Optimize Your Code In Python
7:32
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 57 М.
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 9 МЛН
What will he say ? 😱 #smarthome #cleaning #homecleaning #gadgets
01:00
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 46 МЛН
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 793 М.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 186 М.
Optimising Code - Computerphile
19:43
Computerphile
Рет қаралды 145 М.
Unlocking your CPU cores in Python (multiprocessing)
12:16
mCoding
Рет қаралды 301 М.
How I Would Learn to Code in 2024 (if I had to start over)
13:44
Internet Made Coder
Рет қаралды 76 М.
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 141 М.
WHAT Is "Glob" In Python?! (It's Actually Very Useful!)
11:15
5 Amazing Ways to Automate Your Life using Python
18:40
Internet Made Coder
Рет қаралды 243 М.
I run untested, viewer-submitted code on my 500-LED christmas tree.
45:17
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 9 МЛН