One more thing the guy has missed: watching KZbin videos at x2 speed makes you write faster Python
@juanok27753 жыл бұрын
true that
@LaurentLaborde4 жыл бұрын
FINALLY a performance oriented talk that actually helped me ! now i hate python slightly less that an hour ago :D
@ukrainian3332 жыл бұрын
I'm was looking for this kind of video for years...
@sheikhakbar20674 жыл бұрын
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!
@name62975 жыл бұрын
12:05 would range function be a better option ?
@nelsonjma6 жыл бұрын
excellent ideas, thanks for the information.
@matthias-vomr8 жыл бұрын
Great talk. A lot of useful stuff
@NirHaramati5 жыл бұрын
Brilliant! Thanks.
@marcd41445 жыл бұрын
You know you're big shit when you're walking around on stage with no shoes on at a Dev event. lol
@broccoloodle4 жыл бұрын
Weren't most of them optimized with JIT compiling alr?
@MrLehoczky3 жыл бұрын
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
@pemessh3 жыл бұрын
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.
@sorry4all3 жыл бұрын
Definitely. It's the best way to hide an error
@twnfaem5 жыл бұрын
Thanks a lot Sebastian! A bunch of useful stuff in there, indeed!
@JakubArnold6 жыл бұрын
At 12:40 ... 222ms vs 127ms and he says 75% faster?
@valentinkhomuteno68256 жыл бұрын
222 is 175% of 127, I think that what he meant. And he is right, in a way.
@tomriddle22576 жыл бұрын
I don't get the problem either. It's correct imo or how would you calculate it?
@prat-man5 жыл бұрын
I needed this
@BryanJenks3 жыл бұрын
i know this is a man of culture because his code is in Gruvbox 🤣
@smackronme7 жыл бұрын
skip to 6:15
@NobleSteed004 жыл бұрын
better yet skip to 24:08
@willemvdk48863 жыл бұрын
I started skipping the first few minutes because I need my answers faster.
@RoamingAdhocrat3 жыл бұрын
Using comic sans in the chyron makes for faster code.
@αλήθεια-σ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.
@keithcu26 жыл бұрын
Great, but he should have talked about Cython as an option instead of C/C++.
@vwwvwwwvwwwvwwvvwwvw7 жыл бұрын
what does the % before timeit do? as in %timeit
@julioargumedo67227 жыл бұрын
It's a magic function from the Ipython
@JoshuaShope7 жыл бұрын
Not fast because Python2
@flamendless2 жыл бұрын
Instead of optimizing, just by a faster hardware? What 😂
@JLPT-AIsensei2 жыл бұрын
Great job but after that Python is still very slow.
@TheGodSaw5 жыл бұрын
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-mi4od5 жыл бұрын
Godsaw this is a joke right
@ingframin8 жыл бұрын
"if you want your code to run faster you can start getting faster hardware in a first place"... Come on really? -.-"
@eljapel6 жыл бұрын
hardware is cheaper.
@rockybangalore38305 жыл бұрын
Witing faster python, skip the aplhabets
@sivasankar27843 жыл бұрын
The audience not laughing at this first joke must be demoralizing af.
@LashyYT5 жыл бұрын
I’m a beginner with python Print (“hello world”) Hello world A = ‘hello’ A Hello
@Penta_Penguin_2373 жыл бұрын
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
@lionpersia6 жыл бұрын
Didn't expect such a high-pitch voice from such a large guy.
@lepidoptera93373 жыл бұрын
Oh, boy, that was a waste of time. Picking faster hardware rather than a faster algorithm? In what universe does this dude live?
@jphvnet3 жыл бұрын
If you are capable of refactoring in a good way, new hardware will be cheaper 😉
@lepidoptera93373 жыл бұрын
@@jphvnet Refactoring has nothing to do with performance. Are you sure you understand what a compiler does?
@MrSkinkarde2 жыл бұрын
Slowest language ever
@kaushik8532 жыл бұрын
Better than the Monster lik Java
@DrBPhD5 жыл бұрын
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.
@WerexZenok4 жыл бұрын
That's a short sighted view. With python you have less time training people to code and also less time building your program.
@DrBPhD4 жыл бұрын
@@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.
@WerexZenok4 жыл бұрын
@@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.
@carlossegura4034 жыл бұрын
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.
@DrBPhD4 жыл бұрын
@@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.