Compiled Python is FAST

preview_player
Показать описание
—————————————————————————————————————————
Python has a bit of a reputation -- fast to write, but slow to run.

In this video, we focus on a simple to understand dynamic programming problem that would be terribly slow in native Python or numpy. We show that Python can achieve (and actually exceed) C++ level performance with the help of just-in-time and ahead-of-time compilers such as mypyc, Cython, numba, and taichi.

Also, I finally got a camera, so, uh... face reveal, I guess.

#python

Chapters
---------------
00:00 Intro
01:07 The Problem
02:38 numpy
03:08 mypyc
04:08 cython
06:46 numba
07:58 taichi
09:47 Results
11:48 Final Thoughts
Рекомендации по теме
Комментарии
Автор

If you're new here, be sure to subscribe! More Python videos coming soon =]

dougmercer
Автор

Numba and cython are an easy way to improve performance beyond what most people require for python, and they don't require much boilerplate either.

flutterwind
Автор

Great video, I enjoyed it! In my eyes the video actually shows how fast C++ is. Unoptimized line by line translation from Python to C++ can be as fast as compiled Python optimized with HPC library.

megaspazos
Автор

This channel is highly underrated. Excellent analysis.

mr_voron
Автор

If it ran faster than your c++ code, there is a problem with your c++ code. It's basically impossible to run faster

dudaseifert
Автор

I've also had some fun using various methods to speed python up, and this video is a great overview of the major ways of going about it, but while it's a big departure, I've found nim to have the most python-like syntax while being as fast as things get (compiles to c, among many other languages). I've seen that you know about the true power of python already, but James Powell did a great talk about this exact topic titled "Objectionable Content", big recommend. Thanks for the video!

sr
Автор

Thank you for making this. Trying out mypyc, cython, and numba right now! :D

dhrubajyotipaul
Автор

Subbed, nicely done. I can tell you were having fun, IMO don’t worry so much about the glitzy graphics - your story telling is great!

Masterrex
Автор

Love this video so much! The quality of content, animation, and visualization is unmatched...

ethanymh
Автор

damn, this is a high effort channel. your stock footage game is especially on point.

hope you pop off big time :)

onogrirwin
Автор

Nice video. I have just learned cython and achieved a speed up of 500x vs pure python(+numpy) in one of my code. It worth to mention that using cython, you can automatically parallyze your loop with prange statement instead of range.

jcldc
Автор

pypy is a jit for full python with special bindings for numpy and scipy. you can use it for any python code, but for max performance might need to write critical parts of your code in rpython, a subset of python that can be statically compiled to native binary. The example subsequence code is valid rpython btw.

cmilkau
Автор

Wow! Really informative and interesting - Thank You! I am now a subscriber 😊👍

matswikstrom
Автор

I was already aware of numba, but it's good to see all the others like this. Enjoyable video, and I was happy you showed most of the code, while somehow making it feel like a documentary

YuumiGamer
Автор

Brilliant video and useful content. It's a pity there's so few of us... Glad the algorithm suggested this video

giannisic
Автор

Dude, the quality and depth of this video is insane. I feel like I have a deeper understanding of the strengths and limitations of python, and I have been using it for about 7 years. Thank you

alexsere
Автор

Easily the best video I have seen on performance Python, subbed.

dare
Автор

good content, great presentation. love the style!

Finnnicus
Автор

Well, I use numba in my research, concerning the human genome, it was really fast!

guowanglin
Автор

Gotta love mypyc, I've been using it in my project and never felt disappointed

josebarria