Тёмный

Why is Python SO slow!? 💀  

Coding with Lewis
Подписаться 559 тыс.
Просмотров 743 тыс.
50% 1

Наука

Опубликовано:

 

21 янв 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 749   
@jaredwilliams8621
@jaredwilliams8621 5 месяцев назад
As someone who has to debug code, I would consider dynamic types a con as well.
@BboyKeny
@BboyKeny 5 месяцев назад
I think this happens almost anytime you use a scripting language for non scripting things.
@MoveAlongPeasant
@MoveAlongPeasant 5 месяцев назад
That just makes you bad at your job. Point blank. Dynamic types aren’t hard. This is a skill issue.
@rkidy
@rkidy 5 месяцев назад
@@MoveAlongPeasantwhat a foolish comment. Static typing allows the compiler to check a massive amount of possible bugs at compile time rather at run time. If it was worse than dynamic typing why does almost every other major language use static typing. Why is typescript so beloved by developers. You sound like a clueless first year comp sci student.
@lobotomy-victim
@lobotomy-victim 5 месяцев назад
⁠not being able to write rust code as fast as python makes you bad at your job. Point blank. Using real languages isn’t hard. This is a skill issue
@samblanton967
@samblanton967 5 месяцев назад
@@lobotomy-victimtalking as if python isn’t a real language is a brain issue
@Gameplayer55055
@Gameplayer55055 3 месяца назад
Remember, python is used for AI It's the special limitation to prevent creating skynet
@nathaaaaaa
@nathaaaaaa 2 месяца назад
All of the AI that "Python" does is actually C, C++ and Fortran. Python is just a wrapper for the native functions through FFI
@torbilan6292
@torbilan6292 2 месяца назад
@@nathaaaaaa yet we still use python for ai. good composition doesn't make stuff good as well. plus, c++ and fortran are just some wrappers for assembly.
@joyhoon
@joyhoon 2 месяца назад
wrapper for assembly? wtf, don't you know what compilers do? If C++ is just a wrapper, It have to be one output for one source, but It is not!
@torbilan6292
@torbilan6292 2 месяца назад
first of all, compilers ARE the wrapper itself. second, chil, mofo, calm the f down and read the context, then try to figure out why I would say that to the previous guy. if you can't that's ok, you tried. but remember, everything is a wrapper.
@toadragethe5th
@toadragethe5th 2 месяца назад
​@torbilan6292 by that logic, all languages are wrappers for assembly
@user-hv4nl9rn8t
@user-hv4nl9rn8t 5 месяцев назад
Python developers explaining why their language being 1000x slower than every other one is a good thing:
@anderdrache8504
@anderdrache8504 5 месяцев назад
It's crazy because JS has dynamic typing as well and the rules are so much more loose and weird but it's speed is atleast sometimes within an order of magnitude of ahead of time compiled languages.
@kooskoos12345
@kooskoos12345 5 месяцев назад
Ikr
@senzmaki4890
@senzmaki4890 5 месяцев назад
​@@anderdrache8504JS runs the web there's infinitely more devs working on making JS efficient than Python
@fus3n
@fus3n 5 месяцев назад
​@anderdrache8504 because js uses JIT and Python doesnt, it has to interpret the bytecode it generates , "interpreted language" is very vague.
@anderdrache8504
@anderdrache8504 5 месяцев назад
@@fus3n I know but if JS can Python can too. Why doesn't it?
@Martynyuu
@Martynyuu 3 месяца назад
Oh, I thought because a Python has no legs
@Aman_Boy-dc2nn
@Aman_Boy-dc2nn 3 месяца назад
😂
@kostya8764
@kostya8764 2 месяца назад
html doesn't have legs too
@Jaimekk
@Jaimekk 2 месяца назад
​@@kostya8764 The joke is that there's a snake called Python
@subtheman2136
@subtheman2136 2 месяца назад
@@Jaimekkeveryone knows that😂
@Jaimekk
@Jaimekk 2 месяца назад
@@subtheman2136 I don't think so, non-English speakers might not know
@irtizababar2203
@irtizababar2203 5 месяцев назад
Can't wait for when the Python JIT compiler is finally complete
@WakeUpDuringNights
@WakeUpDuringNights 5 месяцев назад
Is it in the development stage?
@jakubkucera1973
@jakubkucera1973 5 месяцев назад
It basically is though, just use pypy or anything similar
@maxrinehart4177
@maxrinehart4177 5 месяцев назад
Didn't they work on removing Gil as well?
@smanzoli
@smanzoli 4 месяца назад
Numba is complete for years
@Chicken_Soy
@Chicken_Soy 4 месяца назад
@@smanzoliyes
@pretzel4626
@pretzel4626 5 месяцев назад
It's important to clarify what the test is when comparing speeds. Python looks much worse on shorter tasks due to the overhead Python requires on startup. This can be mitigated somewhat when compiling python to .pyc files. At medium tasks, python looks much better. At massive tasks we see the gap widen again, and this can be somewhat mitigated by compiling with optimized bytecode into .pyo files. Dev time is worlds faster for python and it's portability is fantastic. Debugging is all just personal familiarity, because neither are that hard if you work with it. Portability can be matched by few compiled languages, but most include varying levels of additional steps/setup/tests. Fighting over languages is silly, because at the end of the day the reason you use one over the other is because: I'm paid to use [My Language] I like the control/safety of [My Language] I like the syntax/structure of [My Language] I only know [My Language] I'm conditioned to make fun of [Your Language] At the end of the day there are workarounds to alter the standard behavior, mitigate the shortcomings, and interact with most APIs with whatever language you choose. If it's Turing complete, then you just need to get gud, lol.
@samblanton967
@samblanton967 5 месяцев назад
So true, people love to bicker, but there is a million reasons to choose a certain language for a task. For my projects a few seconds has never been a deal breaker and the development time is most important
@anderdrache8504
@anderdrache8504 5 месяцев назад
6 seconds is not a task where startup time is of any influence, like what? Also I feel like the "we shouldn't fight over languages" is just used to excuse bad implementations. Yes, languages make a difference and we can and should talk about differences of programming languages to learn their use cases and to improve them.
@cyrilemeka6987
@cyrilemeka6987 5 месяцев назад
Well said
@stefsot2
@stefsot2 4 месяца назад
None benchmarks startup time lol, what's up with thai copium
@Duconi
@Duconi 3 месяца назад
I don't know about this benchmark but I have seen another benchmark that doesn't include start times in it. It just measures the task itself and there Python is extremely slow. I'm sure you can improve it further, but why not using an Language that is also simple to write but much faster in the first place?
@12kenbutsuri
@12kenbutsuri 4 месяца назад
You can always combine c/c++ and python. And its relatively easy.
@dirknash4113
@dirknash4113 Месяц назад
Cython
@KavyanshKhaitan
@KavyanshKhaitan Месяц назад
@@dirknash4113 its called CPython... CPython: Built upon C JPython: Built upon Java
@pretro6136
@pretro6136 5 месяцев назад
You also forgot about the compatibility, Python can easily be paired with fast languages like c or rust. I like to write most of the code in python, and write the important functions in rust, that way my code is fast and easity to read.
@petrlaskevic1948
@petrlaskevic1948 5 месяцев назад
But is it easier to interface your rist code with Python than writing the whole thing in Rust?
@pretro6136
@pretro6136 5 месяцев назад
@@petrlaskevic1948 yeah, otherwise i wouldn't do it. Most projects don't need to be fast for 90% of the project, and writing 10% of my code with rust makes my code look almost the same (i use maturin/pyo3, which allowes me to run rust functions as python functions), but the code is 100x faster when it needs to be
@SXsoft99
@SXsoft99 5 месяцев назад
You mean like most old school languages?
@pretro6136
@pretro6136 5 месяцев назад
@@SXsoft99 you mean dlls? Yeah
@petrlaskevic1948
@petrlaskevic1948 5 месяцев назад
@@SXsoft99 rust is younger than python
@Darth_Insidious
@Darth_Insidious Месяц назад
There's not many languages which can beat the ease of pip. I've had c libraries render parts of my OS unusable after a botched uninstall
@woa1350
@woa1350 Месяц назад
Csharp and it’s nuget package manager is pretty much on par with pip, or the dotnet cli package manager
@Dong_Harvey
@Dong_Harvey Месяц назад
Funny thing is, Java is both slower than C and less intelligible.
@fcolecumberri
@fcolecumberri Месяц назад
Funnier fact: Java was made when every computer had their own gimmick so by having 1 JVM you "solve everything". Now computers are more standardized with few relevant combinations while JVM have multiple vendors (OpenJDK, Oracle, ...), multiple versions and multiple word size (you can have a 32bit JVM on a 64bit OS) so Java main feature is now a bug.
@colinmaharaj
@colinmaharaj 5 месяцев назад
I'm sticking with C++ Builder and I don't do ML or AI yet.
@sanjamkapoor9843
@sanjamkapoor9843 5 месяцев назад
same.
@TomDytorn
@TomDytorn 5 месяцев назад
22😅2😅😅❤😅❤❤❤😅❤😅😊🎉😂😅2​
@ManOFMedan-
@ManOFMedan- 5 месяцев назад
Same 🥶
@Waxkasta
@Waxkasta 5 месяцев назад
What projects have you worked with c++? I just started cpp and I am a bit nervous
@haijuzerg6556
@haijuzerg6556 5 месяцев назад
Turbo Pascal here
@abdulniyas1657
@abdulniyas1657 4 месяца назад
I remember one twitter post by Francois chollet(author of keras) in which he says , “The complaints "Python is slow" or "Python is unsafe" seem misguided. The point of Python isn't to be fast or safe, it's to be flexible and hackable, and to interface well with everything else. It has become successful by serving as a frontend from which to call other libraries”
@planktonfun1
@planktonfun1 Месяц назад
you can use python to convert python code to assembly and then run that assembly
@actuallyasriel
@actuallyasriel 3 месяца назад
Python *is* compiled to machine code, just on the fly. You can also compile Python to intermediate code just like other languages and this improves the runtime a lot.
@m77mo65
@m77mo65 5 месяцев назад
We transfered the whole project from python to java due its performance. Im not saying we enjoyed write java code, we had to do it.
@senzmaki4890
@senzmaki4890 5 месяцев назад
technically the actual code is not executed line by line, that would be horribly inefficient, it first gets compiled into byte code which is what's executed "line by line" 🤓 ☝️
@sanjamkapoor9843
@sanjamkapoor9843 5 месяцев назад
nerds are great ❤😂
@osasomoregbee4878
@osasomoregbee4878 5 месяцев назад
😂 a TypeError just occured 😂😂😂😂😂
@kooskoos12345
@kooskoos12345 5 месяцев назад
Isnt python interpreted
@senzmaki4890
@senzmaki4890 5 месяцев назад
@@kooskoos12345 the compiled byte code is what gets interpreted not the actual python code
@kooskoos12345
@kooskoos12345 5 месяцев назад
@@senzmaki4890 o did not know that, havent touched any interpreted languages in quite some time :>
@xx_Ashura_xx
@xx_Ashura_xx 5 месяцев назад
things to note is languages like java and c# are also "interptred" or rather use a runtime. but they also have JIT compilers which convert it into the target machine code on the fly
@AndersJackson
@AndersJackson 4 месяца назад
And they doesn't look up names, like class, variables, functions and other scopes during exevution like Python. They do that in compilation stage, not in execution. That is why they are faster and Python slow.
@metgaming9545
@metgaming9545 4 месяца назад
I just wish there was a mode to have it so you can specify a variables type yourself so Python doesn’t have to do it for you. Would significantly speed up run time.
@AndersJackson
@AndersJackson 4 месяца назад
Like Ocaml or Haskel does? It is to late for Python.
@blenderpanzi
@blenderpanzi 4 месяца назад
Python's json module is fast because some of it is implemented in C. Also dynamic typing does NOT makes software development easier. Only in the context of a repl it's easier, e.g. for stuff like Jupyter. But when developing serious bigger software you want static typing, even just for refactoring and clearness of APIs etc. Python gives you the speed of a dynamically typed interpreted language with optional pretty lacking typing capabilities that aren't used by all libraries. yay
@jaspermooren5883
@jaspermooren5883 3 месяца назад
Yeah for me the biggest downside of Python is it's dynamic typing. I hate it. As a Data Scientist I use it a lot anyway, because I kinda have to, since all the good libraries are in Python, but yeah, I type as much as possible manually anyway (which is possible in newer versions of Python), and having documentation that isn't typed is just annoying. Also IDE's work way better in typed languages, the predictive text is just on a whole different level. Tab is probably the key I press the most when programming in a static typed language, you type 2 letters, and the IDE knows what you mean already.
@fueledbycoffee583
@fueledbycoffee583 5 месяцев назад
For our codebase we are using Mypy to enforce types and new 3.11 and 3.12 typing features. is not perfect but allowing parameters to have custom types via "structs" and know the return type of a function (even know if it can return exceptions) is a bless for debuggin stuff
@rustygear9370
@rustygear9370 3 месяца назад
A good point about using python in AI: if it used C++ or assembly, it would be already running the world.
@bluesquare23
@bluesquare23 3 месяца назад
Did you just preface your own point that you were going to make with "good point" 😅
@horryportier7539
@horryportier7539 3 месяца назад
You know that most high compute stuff is implement in c under the hood
@username-oz6gz
@username-oz6gz 3 месяца назад
the SkyNet is real
@michaelwatson7211
@michaelwatson7211 2 месяца назад
The python ML libraries wrap C++ (or similar) code, which is why real world python isn't that slow. The idea is: python 'interprets' one line then passes off all the heavy lifting to precompiled binaries, so the interpreting time is tiny compared to the execution time. If your code is not doing that you are probably doing somthing wrong. If your code is doing that, in my experiance, it's probably faster than the naive C I would have written becuse the C python is calling is very well optimised.
@sninctbur3726
@sninctbur3726 Месяц назад
Writing an AI in Assembly 💀
@russosalv
@russosalv 5 месяцев назад
mhhhh compre dev time and execution time is not so correct. honestly i found python grammar more annoying then js, typescript, java and c#
@AtomicCodeX
@AtomicCodeX 5 месяцев назад
Correct
@rdwells
@rdwells 2 месяца назад
One of Python's strengths is its use as a front end to libraries like NumPy, SciPy, and TensorFlow, which are written in high-level compiled languages like C and C++. I'm guessing that the particle simulation program Lewis described was written entirely in Python. If it had been written using NumPy, it may very well have been faster than the Java version.
@user-hn6hg7sg4v
@user-hn6hg7sg4v 2 месяца назад
Python dev explains why we don't use JIT
@m_a_s6069
@m_a_s6069 4 месяца назад
Python is the slow glue used to hold some C/C++ libraries
@nathaaaaaa
@nathaaaaaa 2 месяца назад
Correct. Python is the weaker link in the chain
@litjellyfish
@litjellyfish 2 месяца назад
It depends on use case. Remember that Python is de facto standard scripting language for creative software. Where it’s used to produce a lot of lore full functions.
@miomip
@miomip 5 месяцев назад
I've said this before. Python is really good for concept builds before using something like Kotlin for the real build. (I decided to use Kotlin as an example because it's stable and compiled)
@anshumanpal2959
@anshumanpal2959 3 месяца назад
First of all you have to know why you are learning a language if you have to be a problem solver then you should go with c++ and c. If you want to make a platform friendly application you should go with Java and python✌️
@taylorswe
@taylorswe 5 месяцев назад
Instructions misunderstood - now programming in elixir
@Kuba-xw1mw
@Kuba-xw1mw 3 месяца назад
Still faster than scratch (You don't have to use turbowarp with multiple addons to do tolerable performance)
@GamingVlogBoxStudios
@GamingVlogBoxStudios 4 месяца назад
As a Python dev, I didn't even know fast compiling like that existed 💀💀
@Josh-kw7zk
@Josh-kw7zk 5 месяцев назад
I love pip, got basically anything
@zhornz
@zhornz 5 месяцев назад
i thied to make a ddos tool with python and it worked but i was pulling 20mbps with 1000 req/s i writed the same code with java and i was pulling 10gbps with 8m req/s
@nomadshiba
@nomadshiba 5 месяцев назад
well some don't hate phyton because it's slow, some hate it because of the syntax
@mahesh_bvn
@mahesh_bvn 4 месяца назад
Oh. I love it because of its simple syntax
@ActionGamerAaron
@ActionGamerAaron 4 месяца назад
Those people are wrong.
@AndrutV13
@AndrutV13 4 месяца назад
​@@ActionGamerAaron Python removes parentheses because they're unnecessary, then forces you to use indentations instead of them
@Duconi
@Duconi 3 месяца назад
I agree. I love to write code in a line and let the formatter do the job of making the code look nice. But as the formatting of python changes the behavior of it, that's just not possible with python.
@ItsCOMMANDer_
@ItsCOMMANDer_ 2 месяца назад
This is me, fuck indentation, fuck no semi colons
@litjellyfish
@litjellyfish 2 месяца назад
And Java can also be considered slow depending on what you compare it to. Also if parts of the Python code is really slow you can create that function in C / C++ and just call it.
@KangoV
@KangoV 3 месяца назад
Python is also single threading. Most libraries are C/C++ underneath.
@HectarMaker
@HectarMaker 5 месяцев назад
Python is always the better second option. But never the first one. Being "easy to code" ends up with lack of knowledge about what are you doing. Magic happens under the hood and then weird and disturbing bugs appears out of nothing. Compilation and type safety is there to minimize human errors.
@AndersJackson
@AndersJackson 4 месяца назад
Type help humans find errors. It ALSO help the compiler make fast compiled code. Python had nothing of that. Languages like Ocaml do have the speed and ready syntax like Python. And you dont need to write the type of all variables and methods unless some fee exceptions. But you can write types in the code if you want to.
@GalaxyTracker
@GalaxyTracker 3 месяца назад
In the modern world, coding is not only for developing apps, but just the means to an end. Try downloading and manipulating satellite datasets with C++ or doing ML in any other language without PyTorch or TF and tell me again that it's the second best option.
@Bruh-sp2bj
@Bruh-sp2bj 3 месяца назад
just say youre ass at writing code and need your compiler to do it for you 💀💀💀
@iankabaka6529
@iankabaka6529 Месяц назад
Why am i coding in the first place, to build and do cool tasks, can i make building easier without having to undergo so much pain in the ass?
@frstchan
@frstchan 3 месяца назад
And yet, all code interviews are about how efficient you can make the code ...
@nerv4316
@nerv4316 4 месяца назад
It is fun and game until your package have conflicts
@user-cp7yw6ho8r
@user-cp7yw6ho8r 5 месяцев назад
Thanks for the analysis! And the visuals! Can you please provide the code for particle interaction?
@technicalnepaltuts
@technicalnepaltuts 5 месяцев назад
Interpreted and bro said checks type at runtime vs when compiled 😅
@darkacb8422
@darkacb8422 3 месяца назад
whenever i want to write a simple script, i use python. its just so easy to work with.
@nbvehbectw5640
@nbvehbectw5640 5 месяцев назад
Also because it's so simple that anyone can learn it, leading to the crappy code written by amateurs
@jaspermooren5883
@jaspermooren5883 3 месяца назад
I mean everyone has to start somewhere... But I do think the field in general has a problem with a lack of trained professionals. There's a certain dicipline required in writing good maintainable code that most people that learned it by themselves just don't have. It's one of the few technical fields where this is commonplace. You don't see a civil engineer without a degree in civil engineering design buildings or roads, but in IT it happens all the time.
@bluesquare23
@bluesquare23 3 месяца назад
Right yeah cause a language being easy to learn is a bad thing. Fucking 🤡s.
@natgenesis5038
@natgenesis5038 3 месяца назад
Despite being slow python is great programming language for A.I ,Data Science,Cybersecurity,….
@andredcavalcante
@andredcavalcante Месяц назад
Python is not so slow. Python is an interpreted platform and it's most important libraries are writen in C or C++, then, the important stuff is already optmized. Better, the most prevalent source of slowness is I/O, what is SO dependent and/or network bottleneck. This is independent of any language.
@Mhashmi32
@Mhashmi32 3 месяца назад
Because it is very high level language
@CodingWithLewis
@CodingWithLewis 5 месяцев назад
I love Python tho
@rodneynsubuga6275
@rodneynsubuga6275 5 месяцев назад
No it's a hybrid language
@user-qw1rx1dq6n
@user-qw1rx1dq6n 5 месяцев назад
Honest question would it make sense to build a system to translate python to C++ or other languages like a google translate for languages to speed up prototyping while maximizing speed
@pretro6136
@pretro6136 5 месяцев назад
@@user-qw1rx1dq6n theres multiple versions of that. The main issue is preformance and language spesific features. Normally it's more popular to add a final executable script with optimization, but python doesn't have that since it's an interperted language (and the compilers kind of sucks)
@cholobok
@cholobok 5 месяцев назад
@@user-qw1rx1dq6nthats not possible. How would you translate x = 1 x = “hello” ?
@nepeta3286
@nepeta3286 4 месяца назад
optimize the first assignation out because the second one renders the first one useless, if you do something with it prior though, just seperate them into 2 variables, or allocate for the biggest of the 2 types, and replace with the second one (with it being a void*) when you reassign it @@cholobok
@fewbronzegames
@fewbronzegames 3 месяца назад
tbh, python is just a good language to learn for things that don't need to run insanely fast, like robotics, some web development, and many other things, in robotics in particular i would always use python because it has good support for it and unless you are making something really complicated it's much easier
@Shakor77
@Shakor77 4 месяца назад
Dynamic typing SLOWS down development time. It is only for small scripts where dynamic typing feels faster. Static typing is much better for large programs.
@jaspermooren5883
@jaspermooren5883 3 месяца назад
Yeah it's the worst part of Python. I don't like dynamic typing at all. It just makes everything way less clear. At least in Python you can type still, but it is just not nice and the fact that it's not enforcable, removes all the predictablility of enforced static variables. Dynamic typing causes so many bugs, it's unreal. I still use Python all the time, but that's because as a Data Scientist you kind of have to, since it's where all the good libraries are, but that doesn't mean I like it.
@LG-qz8om
@LG-qz8om 3 месяца назад
Python is the new BASIC It is a general learning language that just happens to have a lot of cool libraries compiled in other language.
@xenia1250
@xenia1250 4 месяца назад
I mean compilation time has to be considered when you're considering for time to complete a task, but if you're gonna be repeating a complex enough task many thousands of times after the code is written, or a simpler one many thousands of times a second for a while, the compilation times start mattering less and less. That's why some compilers have optimizations that increase compilation time of large programs by several minutes yet performance by a fraction but if you're gonna be running it sparsely, or even run it only once per each time you tweak the code, havin no compilation time matters a lot
@AndersJackson
@AndersJackson 4 месяца назад
For most languages. Ocaml have a fast compiler, and generate code that execute almost in C speed. It is functional and object oriented and have a REPL that compile the code when you load it into the REPL. And it have a full type system that do hard type check. But you mostly only need to write types when you like, for clarity and a few cases when it can resolve to different types. Which is rare.
@zipkitty
@zipkitty 4 месяца назад
Depends on the use-case, for my needs it is really light and fast
@Silent_poet
@Silent_poet 3 месяца назад
I am fan of python because i cant process other syntaxes in my head😂
@thepriestgodneverpaid
@thepriestgodneverpaid 2 месяца назад
and as well python is mainly used for ai code which you one once in a while
@NiCo-gw2dh
@NiCo-gw2dh 2 месяца назад
The json package is extremely slow for me for (de)serialisation. I use orjson (Rust implementation) which is way faster
@Explore4code
@Explore4code 5 месяцев назад
Mojo is our big brother 😎
@Dpk_YT
@Dpk_YT 5 месяцев назад
Still in development phase
@Wyklepheph
@Wyklepheph 3 месяца назад
Dynamic types do NOT let you program faster, they just lower the barrier to entry and make it easy to do really stupid things for no good reason. Especially when you can still have type inference and static typing. Idk, dynamic typing held me back for a while and prevented me from learning important concepts bc it was always too easy to just use python. I learned Nim a while ago and write way better code as a result, regardless of what I'm using now. I can do way more, with far less debugging compared to dynamically typed languages.. It feels closer to test driven development, if anything. Nim's the first thing I reach for when thinking of what to use to build something with because I can compile tiny little binaries for any system and it actually frees my brain up to think more about orienting my design around data, not classes.
@comp.eng.student2055
@comp.eng.student2055 2 месяца назад
Theres decorators like jit that will compile python functions
@Rasa_b
@Rasa_b 3 месяца назад
Is there a compiler version of it out there?
@DurpMustard
@DurpMustard Месяц назад
It’s English. It basically translates English to byte code.
@smanzoli
@smanzoli 4 месяца назад
It's not. It's a 10 year old dead concept.
@user-xh9pu2wj6b
@user-xh9pu2wj6b 4 месяца назад
define dead concept. Python is used constantly even today, so it's hard to call it dead imo.
@marisakirisame867
@marisakirisame867 3 месяца назад
Me who consider writing in x86 assembly :
@shivam_in
@shivam_in 4 месяца назад
For me java code is easier to read and debug than python.
@bluesquare23
@bluesquare23 3 месяца назад
You're probably better at Java than you are at Python.
@anonymous_anonymity
@anonymous_anonymity 2 месяца назад
Python is an interpreted language, so is JS, Ruby, Perl etc.
@antoniohenrique5750
@antoniohenrique5750 2 месяца назад
As someone who used to develop in R, I noticed a very bad performance in python to execute simple tasks like plotting or transforming data. I don’t like neither, but in the end they are useful to integrate with other faster APIs written in C/Fortran
@OBGynKenobi
@OBGynKenobi 3 месяца назад
It's even better now without the GIL
@CYBER-HERO
@CYBER-HERO 4 месяца назад
we can use cython compiler so we can convert our python code to C code. But, the compiler is in startup and its new
@AndersJackson
@AndersJackson 4 месяца назад
The language has not the properties to be sble to make fast code. Unless you change syntax and most important semantics of the language. It depends on looking up names, like classes, metjods and cariables, in tables during exevution, which make it slow. These tables are representing the scope of the language. And to make fast code, you really need type information. Which is really hard to get from Python. Better to change language after prototyping in Python if you need speed and security of type checking. Look for Ocaml and make a serious go, if you want to know what I mean.
@CYBER-HERO
@CYBER-HERO 4 месяца назад
@@AndersJackson i really appreciate your reply and i liked it Also i recommend learning go because its a compiling language, i mean the code need to be compiled to run like c# And C++ etc... Go is a pretty good language its close to python in the syntax and a i recommend learning python to understand the programming languages and the computer language at all and then go to GO language.
@GaryChike
@GaryChike 3 месяца назад
Python is so slow because it lost its 'mojo' 😂
@Eugen1344
@Eugen1344 5 месяцев назад
Well, the "development time" should also consider "debugging time" and "maintenance time", which are the weaknesses of Python
@revimfadli4666
@revimfadli4666 5 месяцев назад
And "lost user time"
@anderdrache8504
@anderdrache8504 5 месяцев назад
@@revimfadli4666 yes, I hate all this slow and crashy software that is excused by "faster dev times" which often isn't even true.
@revimfadli4666
@revimfadli4666 5 месяцев назад
@@anderdrache8504 this! especially if those devs end up spending more time debugging their "mvp"
@DhruvRed
@DhruvRed 4 месяца назад
You don’t know how to write the modern python code. It doesn’t force you to do it correctly but you should be experienced enough to do things pythonic way that is use types, pydantic, asynchronous await so on whereever it is needed which speeds up the code and also makes debugging much easier
@davidvernon3119
@davidvernon3119 3 месяца назад
It’s important to remember that slow also means energy inefficient. As engineers we have an obligation to the planet. We have an obligation to build systems that are as efficient as they can be made to be. Languages like Java script and python are horrible when you consider their environmental impact.
@Awesomesauce0096
@Awesomesauce0096 3 месяца назад
You typing that comment is bad for the environment
@davidvernon3119
@davidvernon3119 3 месяца назад
@@Awesomesauce0096 I’m not arguing that we should abandon technology. I’m arguing that we shouldn’t solve software engineering problems with pollution, but rather with thought.
@kapytanhook
@kapytanhook 3 месяца назад
You exhale co2, you know what to do about that. It's like people in 1800 worrying about manure build up or food running out. Technology overcame it. If anything these python people seem first to get to the AI scene that will set up a comfy future for you nervous Nellys
@davidvernon3119
@davidvernon3119 3 месяца назад
@@kapytanhook “exhale co2” try harder, this argument is a straw man. But it is also true that in order for humanity to survive we will need to radically reduce the human population. Hopefully this can be done in an orderly manner. Also, I’m not arguing that inefficient tools aren’t useful - they are. But… it is immoral to deploy them at scale. For example the cost of Python is typically considered to be 30x. That is unconscionable.
@xBintu
@xBintu 3 месяца назад
​@kapytanhook must be a hard life being that bitter, work on yourself...
@williankoessler5935
@williankoessler5935 3 месяца назад
There are some packages for python that attempts to mitigate the "slow execution" con, by "compiling" the code into a .exe file
@silversurfer1967
@silversurfer1967 5 месяцев назад
All advantages of python goes away when you start debugginh a very large code base.
@RedHair651
@RedHair651 5 месяцев назад
It has the most libraries, it's very easy to do anything you need to do
@user-pe7gf9rv4m
@user-pe7gf9rv4m 5 месяцев назад
Please stop using Python.
@silversurfer1967
@silversurfer1967 5 месяцев назад
@@user-pe7gf9rv4m Would you please "assert" that every time I write a line of code ?
@irtizababar2203
@irtizababar2203 5 месяцев назад
​@@user-pe7gf9rv4mPlease stop using social media.
@okthisisepic9218
@okthisisepic9218 5 месяцев назад
@@user-pe7gf9rv4mwhy? It’s the most common language if you are seriously interested in most CS fields python is necessary to learn. If you are so bad at python maybe you just don’t know how to code
@stevemeisternomic
@stevemeisternomic 3 месяца назад
The take away is that you should use the right tools for the right task. Build your components in c and your interface in python. Get the best of both worlds.
@rushas
@rushas 5 месяцев назад
You can still develop fast with statically typed languages, by using the right IDE
@jaspermooren5883
@jaspermooren5883 3 месяца назад
Yeah Static is faster imo. The predictive text gets way better when you're in a static typed language, you're IDE actually knows what you are doing. I actually write the name of a method/function exactly once fully when I'm programming, after that you just tab through.
@stevenclark2188
@stevenclark2188 3 месяца назад
I just want it to be smaller when using the basic libraries so I can use it to replace shell scripting on in storage constrained environments.
@sanjaybhatikar
@sanjaybhatikar 3 месяца назад
Python is just a joy to code in!
@davidperry4013
@davidperry4013 3 месяца назад
Python is very beginner friendly
@mikeyangyang8816
@mikeyangyang8816 4 месяца назад
As a developer, Python is much much much harder to debug than C, C++, or Java are. I have worked on some large Python projects. They were absolute nightmares to deal with, nothing has a reason , but everything happens (i know it doesn't make, but it is what i felt debugging it)
@calamity3007
@calamity3007 3 месяца назад
really? I just build web servers, but back end skeleton system tell you the error 99% of the time, line to go to, and how to fix it... Java looks so messy to me, I hate it. Here some random variables a,b,c,x, alien signs.
@mikeyangyang8816
@mikeyangyang8816 3 месяца назад
@@calamity3007 Em... You are not really interfacing with Python, you are using a Python binding to the backend, which is written in other languages. If you are talking about flask or django, they are high level server tools that have python bindings. You are not really writing programs. You are defining jobs to do for the framework using python. Java's error "looks so messy" because the language itself knows exactly which part of itself is wrong and why. It is printing out the call stack to help you understand why it's not working. In python... there are no types. So, you cannot deterministically say a function works or not before it runs. This is drastically difficult to work with if you are working on a larger Python project. Try to write a 50,000 lines Python project yourself. Because I tried to do that and had to switched to C++ half way, best choice ever. Using C++ saved me probably 2 months of development time.
@calamity3007
@calamity3007 3 месяца назад
I don't even know what I said lmao. youtube deletes my comments.
@A-wb1eq
@A-wb1eq 3 месяца назад
python (with the right bindings) can also use libraries written in C, which can handle performance critical tasks
@darioferretti3758
@darioferretti3758 3 месяца назад
Python is just worse lua, but with more libraries
@Mars86442
@Mars86442 5 месяцев назад
And it literally uses a library for everything
@irtizababar2203
@irtizababar2203 5 месяцев назад
And that's a bad thing?
@Mars86442
@Mars86442 5 месяцев назад
@irtizababar2203 nope but you have to learn each one and you really don't know how did they do the library so it's so annoying
@okthisisepic9218
@okthisisepic9218 5 месяцев назад
@@Mars86442or you could just use google and quickly research the library which takes a few moments the same amount of time it would take to learn a different solution
@crazyparrot2786
@crazyparrot2786 5 месяцев назад
It's annoying for you, advantage for people who want to get things done​@@Mars86442
@Duconi
@Duconi 3 месяца назад
Well it has to, else everything would be painfully slow and no one would use it.
@pedroivog.s.6870
@pedroivog.s.6870 2 месяца назад
Numba and Cython do compile Python for a considerably faster execution
@mariogalindoq
@mariogalindoq 4 месяца назад
Yes, every language has its pros and cons, but Java is definitely the worst language ever invented.
@letsthinkforamoment8904
@letsthinkforamoment8904 5 месяцев назад
that's why c# is king
@bruceblosser384
@bruceblosser384 3 месяца назад
Every routine that is slow in Python, can be substantially sped up, by libraries!
@BirCplusplusGeliştiricisi
@BirCplusplusGeliştiricisi 3 месяца назад
I always use C++. Fast and determined.
@MrEditor6000
@MrEditor6000 3 месяца назад
Choose your tool wisely. You wouldn't bring hammer to a hot dog eating contest.. you'd bring your belleh!
@theegg895
@theegg895 4 месяца назад
Ok but jav and like you sead js are both compiled and dinamicly typed where you can add a int to string
@Kiraint
@Kiraint 4 месяца назад
snake and snail emoji fr
@Milkguy33
@Milkguy33 3 часа назад
guys.... the delay is less than 0.00001 ms...
@neeleshranjansrivastava6985
@neeleshranjansrivastava6985 5 месяцев назад
Python's stack trace is shit
@abderrahimkessira5352
@abderrahimkessira5352 2 месяца назад
Python is an interpreted language, Matlab is a compiled language, I love Matlab 😅
@csl750
@csl750 2 месяца назад
Gotta choose the right language for the project...
@ThisShitWontWor
@ThisShitWontWor 4 месяца назад
The biggest advantage of python for me is that you can run your script on every type of machine/os, personally I only use it for writing pseudo code on my phone
@diamondan5721
@diamondan5721 2 месяца назад
I remember I tried to code geometry dash as one of my first big coding projects. It was so bad that you could barely even LOOK at the code.
@kjyhh
@kjyhh 3 месяца назад
I wonder why such a slow language can be the best mathematic tool.
@bluesquare23
@bluesquare23 3 месяца назад
Okay first off Python is still fast. Millions of operations per second fast. Turns out all computers today are super duper fast. It's a good math tool cause it's popular. So people write library code for it, that other people can then use in their projects. It's not all about relative speed with other programming languages. In fact most programmers don't even think about that when they go to choose a language. These speed differences in languages are often so inperceptible at human time scales that to you the programmer they're really not even worth considering. Focus on how you can make your code faster. You're much more likely to notice speed gains by improving your own code, rather than switching languages. It is possible to be inefficient code and end up with slower programs in faster languages.
@ItsCOMMANDer_
@ItsCOMMANDer_ 2 месяца назад
Because all the math stuff like numpy is written in c lol
@Vash.Baldeus
@Vash.Baldeus 4 месяца назад
There is a lot of overhead. When comparing Python execution time to C, C++, C# and Java even, you can clearly see the amount of resources used. Python is a SCRIPTING language, not Programming, since you do not compile the code then run it, it is compiled at runtime, which slows it down.
@wassafshahzad8618
@wassafshahzad8618 4 месяца назад
and writing scripts isn't considered programming ? that's new. and its not compiled a runtime its interpreted there's a difference
@Vash.Baldeus
@Vash.Baldeus 4 месяца назад
@@wassafshahzad8618 doesnt deny the overhead.
@kpbendeguz
@kpbendeguz 4 месяца назад
@@wassafshahzad8618Scripting is about controlling an application, not controlling the computer itself. You can call writing a script programming, but the result is a script and not a program.
@edwinontiveros8701
@edwinontiveros8701 4 месяца назад
​​@@wassafshahzad8618 It isn't technically, it's scripting, not coding nor programming. The same way one can't claim to be a Shellscript developer por a Powershell developer. It's just not meant to be used standalone on large codebases, it's meant as a complement.. yet people adapted It to do so., I work on such Python codebases and let me tell you, It can become a nightmare yo refactor and scale properly. Also It's heavy ( almost 90% ) relience on libraries to be useful on the mosy básic tasks, brings up dependency hell early. Dynamic typing obscures too much important codebase information, even some advanced LSP, linters AND formatters have trouble parsing complex modules.
@wassafshahzad8618
@wassafshahzad8618 4 месяца назад
​@@edwinontiveros8701 I agree with your first para but not completely since programming has evolved and we are no longer ties down to the idea of "scripting" in the Powershell way. Since Python can effectively communicate with other services such as an HTML server even without libraries and frameworks. In response to your second paragraph, which codebase or production server is ont relient of external libraries ? Javascript ? GO ? Rust? All of them are, even JAVA, In java even defining dependencies is hell. I also work on Large python codebases and if you not using type annotations then thats not really python issues they have added types to the standard libraries. Refactoring Python bad code is hell cause python unfortunately does make writing bad code quit easy but its also gives you the4 ability to hook into everything you may need. Every thing a developer working on python can do you can do it too. You can even hook into a classes create function and define relevent features at that time.
@keshavharipersad2024
@keshavharipersad2024 3 месяца назад
"choose wisely" okay I still choose Javascript, if not cpp
@adammontgomery7980
@adammontgomery7980 5 месяцев назад
If you think about it, the Python interpreter is extremely fast though. It runs fast with deep abstraction
@krishnendumandal6547
@krishnendumandal6547 5 месяцев назад
In python, you can build complex data structures in minutes with significantly lesser code. Great language to validate your concepts fast.
@KanjiasDev
@KanjiasDev 5 месяцев назад
I thought python is known for being quite fast in it's main fields?
@anderdrache8504
@anderdrache8504 5 месяцев назад
In the case where you just have a few lines of code that call out to libraries, it is. Because you are running C, not python.
@KanjiasDev
@KanjiasDev 5 месяцев назад
@@anderdrache8504 Ok so basically it's like the favourite answer of Lawyers: It depends. Right? xD
@jaspermooren5883
@jaspermooren5883 3 месяца назад
@@KanjiasDev Yep you learn this pretty quick in Data Science for example (where everyone uses Python). Don't try to do actual stuff in python. Stick to calling libraries. Don't create a 2d list, create a Pandas dataframe (for example, for the real big stuff you'll probably use spark, but that's a whole different beast). If you don't, you're gonna have a cardiac arrest real soon from all that coffee you're getting while waiting for the code to run.
Далее
Programming Language Tier List
0:55
Просмотров 2,7 млн
КТО ЭТО БЫЛ?
25:31
Просмотров 309 тыс.
The WORST Programming Languages EVER #shorts
0:31
Просмотров 517 тыс.
Это спасёт камеру iPhone
0:32
Просмотров 420 тыс.