0:00 / 0:00
#optimization#cpython#benchmarking
Writing Faster Python 3 - presented by Sebastian Witowski
EuroPython Conference
36K subscribers • 31 videos on Hallway • Conference channel
- One of the most-watched uploads on EuroPython, a conference or university channel Hallway lists. Nobody has recommended it in the communities yet, so it ranks below community picks.
- Presented by Sebastian Witowski
- May be out of date. The tools, versions or practices it shows have likely moved on.
Intermediate. Assumes working knowledge.
19K views4 years ago
Programming languagesSystems programmingPythonPerformance and optimization
Sebastian Witowski shares practical strategies and tools for measuring and optimizing the performance of Python 3 applications.
EuroPython 2022 - Writing Faster Python 3 - presented by Sebastian Witowski [The Auditorium on 2022-07-14] Did you know that Python preallocates integers from -5 to 257? Reusing them 1000 times, instead of allocating memory for a bigger integer, can save you a couple milliseconds of code’s execution time. If you want to learn more about this kind of optimizations then, … well, probably this presentation is not for you :) Instead of going into such small details, I will talk about more “sane” ideas for writing faster code. After a brief overview of different levels of optimization and how they work in Python, I will show you simple and fast ways of measuring the execution time of your code and finally, discuss examples of how some code structures could be improved. You will see: * The fastest way of removing duplicates from a list * How much faster your code is when you reuse the built-in functions instead of trying to reinvent the wheel * What is faster than the “for loop” * If the lookup is faster in a list or a set * When it’s better to beg for forgiveness than to ask for permission This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License creativecommons.org/licenses/by-nc-sa/4.0/Why it's here
A top upload from a listed channelEuroPython is on Hallway's list of conference and university channels, and this upload is one of its most-watched talks or lectures. Nobody has recommended it in the communities yet, so it ranks below community picks.