RUVIDEO
Поделитесь видео 🙏

Sebastian Witowski - Writing faster Python

Sebastian Witowski - Writing faster Python
[EuroPython 2016]
[19 July 2016]
[Bilbao, Euskadi, Spain]
(https://ep2016.europython.eu//conference/talks/writing-faster-python)

Presentation on how you can write faster Python in your daily work. I
will briefly explain ways of profiling the code, discuss different
code structures and show how they can be improved. You will see what
is the fastest way to remove duplicates from a list, what is faster
than a _for_ loop or how “asking for permission” is slower than
“begging for forgiveness”.

-----

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 of 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 very brief overview of how to optimize Python code (rule 1:
don’t do this, rule 2: don’t do this yet, rule 3: ok, but what if I
really want to do this ?), I will show simple and fast ways of
measuring the execution time and finally, discuss examples of how some
code structures could be improved.

You will see:

- What is 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 good ol’ _for_ loop

- If the lookup is faster in a list or a set (and when it makes sense
to use each)

- How the “It's better to beg for forgiveness than to ask for
permission” rule works in practice

I will NOT go into details of _"serious"_ optimization, like using
different Python implementation or rewriting critical code in C, etc.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Sebastian Witowski - Writing faster Python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.