Think Python's too slow? Sometimes you've just got to take matters into your own hands.
Benchmarks:
github.com/Carberra/python-bu...
00:00 - Intro
00:42 - Performing containment checks using sets (or frozensets)
04:26 - Assigning to dictionary keys (as opposed to using dict.update)
06:19 - List/set/dictionary comprehensions
08:28 - Don't always trust builtins to be faster!
10:51 - Utilising logging's isEnabledFor
13:46 - Outro
-
If you enjoy my content, consider supporting me on Patreon or becoming a member!
patreon.carberra.xyz
join.carberra.xyz
If you need help with anything, feel free to join the Discord server:
discord.carberra.xyz
I get a lot of people asking, so here's my Visual Studio Code setup!
• My Visual Studio Code ...
-
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
Негізгі бет Your Python code NEEDS these 5 EASY optimisations
Пікірлер: 22