23 AnswersNew Answer
Python is a higher level language than C, which means it abstracts the details of the computer from you - memory management, pointers, etc, and allows you to write programs in a way which is closer to how humans think. It is true that C code usually runs 10 to 100 times faster than Python code if you measure only the execution time. However if you also include the development time Python often beats C.Other interpreted languages such as Java bytecode and .NET bytecode run faster than Python because the standard distributions include a JIT compiler that compiles bytecode to native code at runtime. https://stackoverflow.com/questions/3033329/why-are-python-programs-often-slower-than-the-equivalent-program-written-in-c-
Python is an interpreted language. It will never be as fast as a compiled language. That's why a number of modules are nothing more than wrappers around C/C++ code. For computationally intensive operations it is possible to mix Python with native code. https://docs.python.org/3/extending/extending.html https://realpython.com/python-bindings-overview/ This gives you the convenience of Python with the speed of C/C++ where needed.
I dont know about you all, but this question: "Why Python is slow and can fast in the future what do think?" I look at it, then read it, then read between the lines, then read backwards, upside down, ... but I still cant make sense of what it is asking. Especially the part where it goes "and can fast in future what do think?" So I wonder, How did you all come up with these debate argumentals? Was the question clear and I am the only one not getting it? Maybe my brain needs some higher level of language to get started.
Martin Taylor ok bro fixed it.
【ＡＣＥ】 I am not judging anyone's english skills. Just stating that I dont understand anything in there. It s complete garbage of a question to understand. I am the type of person that doesnt assume much out of unclear statements. The word "assume" can be decorticated into three other words: - "ass" - "u" - "me" Assuming then simply makes an ass out of you and me. So one should never assume, one should be certain.
Arsenic ok bro and I didn't claim i thought of helping only anyway thanks for correcting me 😊.
Arun Jamson, you may not have claimed that your response was your own but neither did you give credit, and you still haven't. The lack of an accreditation to your post implies that it is your own. The norm is that a post is assumed to belong to the person posting it if no reference is given; otherwise every post would require a notice that the work was an original work.
ChillPill I don't get it either. But I always tend to find some kind of debate/argument when I read "python", "slow" and "fast" all in same line.
Arun Jamson it's much better to directly share the external link rather than copy pasting the answer ( which is incomplete btw ) from SO and claiming them to be your own. https://stackoverflow.com/a/3033379/12030775
Bot I am interested to know what matric are you using here to back up the fact that Python surpassed Java ?
Martin Taylor you killed me! :P
ChillPill his question isnt that hard to understand. English probably isnt his first language, but we can still pretty much figure out what he is trying to say. So lets not act like compilers shall we?
Martin Taylor, I think Arun Jamson meant that python is more abstract than C, most of the workload (memory management, sanity checks) are all handled internally in python which is not the case in C.
https://www.talentopia.com/python/python-surpasses-java-and-becomes-the-second-most-popular it might have changed in 2021 though
Python is interpretrt
Coz python is an interpreted language so its slow as compared to other languages.