Sebastian Witowski - Writing faster Python

  Рет қаралды 100,399

EuroPython Conference

EuroPython Conference

Күн бұрын

Пікірлер: 59
@mateuszkurowski4510
@mateuszkurowski4510 6 жыл бұрын
One more thing the guy has missed: watching KZbin videos at x2 speed makes you write faster Python
@juanok2775
@juanok2775 3 жыл бұрын
true that
@LaurentLaborde
@LaurentLaborde 4 жыл бұрын
FINALLY a performance oriented talk that actually helped me ! now i hate python slightly less that an hour ago :D
@ukrainian333
@ukrainian333 2 жыл бұрын
I'm was looking for this kind of video for years...
@sheikhakbar2067
@sheikhakbar2067 4 жыл бұрын
That was a good video to listen to while driving to buy falafel! I finished eating them and I have five more minutes to listen to!
@name6297
@name6297 5 жыл бұрын
12:05 would range function be a better option ?
@nelsonjma
@nelsonjma 6 жыл бұрын
excellent ideas, thanks for the information.
@matthias-vomr
@matthias-vomr 8 жыл бұрын
Great talk. A lot of useful stuff
@NirHaramati
@NirHaramati 5 жыл бұрын
Brilliant! Thanks.
@marcd4144
@marcd4144 5 жыл бұрын
You know you're big shit when you're walking around on stage with no shoes on at a Dev event. lol
@broccoloodle
@broccoloodle 4 жыл бұрын
Weren't most of them optimized with JIT compiling alr?
@MrLehoczky
@MrLehoczky 3 жыл бұрын
CPython uses AOT compiler instead of JIT. However there is an alternative language implementation called PyPy with JIT compilation but it's not that widely used
@pemessh
@pemessh 3 жыл бұрын
Couple of the slides had code that used , try except block, and in except block there was 'pass'. Please do not do this. At least log something silently. That way you know what's going on and it works too.
@sorry4all
@sorry4all 3 жыл бұрын
Definitely. It's the best way to hide an error
@twnfaem
@twnfaem 5 жыл бұрын
Thanks a lot Sebastian! A bunch of useful stuff in there, indeed!
@JakubArnold
@JakubArnold 6 жыл бұрын
At 12:40 ... 222ms vs 127ms and he says 75% faster?
@valentinkhomuteno6825
@valentinkhomuteno6825 6 жыл бұрын
222 is 175% of 127, I think that what he meant. And he is right, in a way.
@tomriddle2257
@tomriddle2257 6 жыл бұрын
I don't get the problem either. It's correct imo or how would you calculate it?
@prat-man
@prat-man 5 жыл бұрын
I needed this
@BryanJenks
@BryanJenks 3 жыл бұрын
i know this is a man of culture because his code is in Gruvbox 🤣
@smackronme
@smackronme 7 жыл бұрын
skip to 6:15
@NobleSteed00
@NobleSteed00 4 жыл бұрын
better yet skip to 24:08
@willemvdk4886
@willemvdk4886 3 жыл бұрын
I started skipping the first few minutes because I need my answers faster.
@RoamingAdhocrat
@RoamingAdhocrat 3 жыл бұрын
Using comic sans in the chyron makes for faster code.
@αλήθεια-σ4κ
@αλήθεια-σ4κ 5 жыл бұрын
Don't agree with everything thing - Writhing performent code should be a habit not a after thought. Writhing code without performance in mind and then trying to optimise it later is not the best strategy, sometime it may not even work. It may require too much of design change, too much re-testing. Write optimum code from the beginning. Profile later to see if any small tweaks are required. I have see bad design where people were talking abt. h/w upgrades. Looked at the code, changed the design ...12 hr. execution time reduced to 3 mins.
@keithcu2
@keithcu2 6 жыл бұрын
Great, but he should have talked about Cython as an option instead of C/C++.
@vwwvwwwvwwwvwwvvwwvw
@vwwvwwwvwwwvwwvvwwvw 7 жыл бұрын
what does the % before timeit do? as in %timeit
@julioargumedo6722
@julioargumedo6722 7 жыл бұрын
It's a magic function from the Ipython
@JoshuaShope
@JoshuaShope 7 жыл бұрын
Not fast because Python2
@flamendless
@flamendless 2 жыл бұрын
Instead of optimizing, just by a faster hardware? What 😂
@JLPT-AIsensei
@JLPT-AIsensei 2 жыл бұрын
Great job but after that Python is still very slow.
@TheGodSaw
@TheGodSaw 5 жыл бұрын
to write fast python. never write any algo yourself. Also, if you are using a for loop chances are you are doing something wrong. Got it.
@ds-mi4od
@ds-mi4od 5 жыл бұрын
Godsaw this is a joke right
@ingframin
@ingframin 8 жыл бұрын
"if you want your code to run faster you can start getting faster hardware in a first place"... Come on really? -.-"
@eljapel
@eljapel 6 жыл бұрын
hardware is cheaper.
@rockybangalore3830
@rockybangalore3830 5 жыл бұрын
Witing faster python, skip the aplhabets
@sivasankar2784
@sivasankar2784 3 жыл бұрын
The audience not laughing at this first joke must be demoralizing af.
@LashyYT
@LashyYT 5 жыл бұрын
I’m a beginner with python Print (“hello world”) Hello world A = ‘hello’ A Hello
@Penta_Penguin_237
@Penta_Penguin_237 3 жыл бұрын
Such a loser mentality. Most times faster code is just faster code. Often even more stable. Use C compiled libraries such as Numpy or accelerators like Numba has no downsides
@lionpersia
@lionpersia 6 жыл бұрын
Didn't expect such a high-pitch voice from such a large guy.
@lepidoptera9337
@lepidoptera9337 3 жыл бұрын
Oh, boy, that was a waste of time. Picking faster hardware rather than a faster algorithm? In what universe does this dude live?
@jphvnet
@jphvnet 3 жыл бұрын
If you are capable of refactoring in a good way, new hardware will be cheaper 😉
@lepidoptera9337
@lepidoptera9337 3 жыл бұрын
@@jphvnet Refactoring has nothing to do with performance. Are you sure you understand what a compiler does?
@MrSkinkarde
@MrSkinkarde 2 жыл бұрын
Slowest language ever
@kaushik853
@kaushik853 2 жыл бұрын
Better than the Monster lik Java
@DrBPhD
@DrBPhD 5 жыл бұрын
Python is incompatible with sustainability. The language is in fact so highly (energy) inefficient that it should be banned. It's effect on performance directly relates to energy demands higher by 2 orders of magnitude (100 times) when compared to codes written in C for instance. Python's CO2 fingerprint is therefore of unacceptable magnitude. Most interpreted languages suffer from similar shortcomings by the way, in contrast to compiled languages.
@WerexZenok
@WerexZenok 4 жыл бұрын
That's a short sighted view. With python you have less time training people to code and also less time building your program.
@DrBPhD
@DrBPhD 4 жыл бұрын
@@WerexZenok Training people to code and building programs probably (even likely) has a much lower energy fingerprint than actually running the programs and applications (over and over again). The energy-efficiency of computer languages will be of increasing importance in the future. Python scores unacceptably low in this respect.
@WerexZenok
@WerexZenok 4 жыл бұрын
@@DrBPhD Well, i'm medic and i'm building AI projects with Python. That wouldn't be possible with C, because I would need to lose too much time learning about the language and fixing small syntax errors instead of focussing on the project itself. I already did a research project using a pyautogui. I started with C, but turned out to be impossible to proceed in a reasonable velocity using C. I changed python and managed to do it in time. If i want velocity in any part of my code i can change to C just in that part. In other words: Python - velocity to build the program. C - velocity to run the progam.
@carlossegura403
@carlossegura403 4 жыл бұрын
Not saying you are wrong but did you forget, including “time” into your optimization paradigm? By “time,” I mean the average lifespan of human life on this planet, around 79 years. Beyond anything, time is the most limited resource, as it cannot be created, thus making it the most valuable. Every product and service, including computers and software, exists only for one reason - to save us time! With the proofs mentioned above, we can understand why Python is popular and why your statement is false concerning “energy and sustainability.” I use python because it lets me focus on the problem more than any other language has, and it is the reason it's perfect for data science. Lastly, languages like C, C++ are also important and I cannot discard them as less important to Python. No one is better than the other; we must learn to appreciate what both worlds contribute towards software development and engineering.
@DrBPhD
@DrBPhD 4 жыл бұрын
@@carlossegura403 Every product and service, including computers and software, exists only for one reason - to save us time! That is a misconception. Every good product and service exists for one sole purpose: to increase the quality of life. And if I really want to save time I write and run Fortran, which is still the language for large-scale scientific computing par excellence. In fact, the only reason Fortran survived until today IS time and speed. Python on the other hand is grotesquely inefficient. And with a substantial percentage of our energy consumption already being accounted for by information-technologies, sustainability-issues are at the heart of the problems connected with time and energy-inefficient languages. Also, if you master a programming language properly it always lets you focus entirely on the problem itself. No need for Python in that respect, there's a multitude of alternatives which give you speedy code AND ease of use.
Writing Faster Python 3 - presented by Sebastian Witowski
42:05
EuroPython Conference
Рет қаралды 17 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
"Stop Writing Dead Programs" by Jack Rusher (Strange Loop 2022)
43:04
Strange Loop Conference
Рет қаралды 441 М.
CppCon 2017: Chandler Carruth “Going Nowhere Faster”
1:00:58
When Python Practices Go Wrong - Brandon Rhodes - code::dive 2019
1:00:51
code::dive conference
Рет қаралды 97 М.
The Fastest Way to Loop in Python - An Unfortunate Truth
8:06
mCoding
Рет қаралды 1,4 МЛН
How we are making CPython faster. Past, present and future - Mark Shannon
28:16
EuroPython Conference
Рет қаралды 1,3 М.
Make Python code 1000x Faster with Numba
20:33
Jack of Some
Рет қаралды 448 М.
Sebastian Witowski - Writing Faster Python 3
42:33
PyCon PL
Рет қаралды 3,5 М.
Raymond Hettinger, Keynote on Concurrency, PyBay 2017
1:13:53
SF Python
Рет қаралды 153 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН