5 MORE EASY Python optimisations

5 MORE EASY Python optimisations

Carberra

54 года назад

5,213 Просмотров

Still think Python's too slow? Here's 5 MORE optimisations to really put your mind at ease!

Benchmarks:
https://github.com/Carberra/python-but-faster/tree/main/2403-more-optimisations

00:00 - Intro
01:04 - Using slicing instead of startswith
04:52 - Utilising optimised truthy checks
07:45 - Using deques instead of lists where appropriate
10:51 - Caching function return values
13:16 - Using NumPy instead of lists where appropriate
15:08 - Outro



If you enjoy my content, consider supporting me on Patreon or becoming a member!
• Patreon: https://www.patreon.com/carberra
• Membership: https://www.youtube.com/channel/UC13cYu7lec-oOcqQf5L-brg/join

Follow me elsewhere for even more Carberra!
• Discord: https://discord.gg/5vVgQpK
• Instagram: https://www.instagram.com/carberratutorials

I get a lot of people asking, so here's my setup!
• Visual Studio Code: https://youtu.be/Kk5h6Yxflmw
• Terminal: https://youtu.be/4RuGK3w6Mbs



If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.

#python #coding #howto

Тэги:

#pyfhon #pytho #pytbon #pytjon #ptyhon #pytyon #ptthon #pyyhon #pythn #pythoh #pythpn #ython #pytgon #pyhon #pytohn #phthon #oython #pthon #pyghon #pythoj #pythno #pythkn #ypthon #pytuon #lython #pyrhon #pythom #pythob #puthon #pgthon #python #pyhton #pythln #pythin #pytnon #pyton
Ссылки и html тэги не поддерживаются


Комментарии: