Ousterhout's article1 about scripting languages suggests that the higher level the programming takes place, the more productive the programmer is. If we take that, as Boehm says2, the number of lines a programmer can write in a given time is constant and not dependent on the language or its type (low level, system programming, scripting), one can easily believe the claim. The resulting instructions-per-source-code-line -ratio can be an order of magnitude (or several) better with scripting languages than with system programming languages.

As scripting languages heavily rely on ready-made utilities for common tasks (e.g. data structures, string manipulation), their main use usually is to enhance productivity with the cost of slower running speed by providing a syntax that's easy to learn and efficient to upkeep programs with. One doesn't resort to a scripting language when top execution speed is needed.

[1]: J. K. Ousterhout, Scripting: Higher Level Programming for the 21 Century, Computer (IEEE), 1998
[2]: B. Boehm, Software Engineering Economics, Prentice Hall, 1981

Answer from Jawa on Stack Exchange
🌐
Medium
medium.com › swlh › a-performance-comparison-between-c-java-and-python-df3890545f6d
A Performance Comparison Between C, Java, and Python | by Gunavaran Brihadiswaran | The Startup | Medium
July 24, 2020 - A Performance Comparison Between C, Java, and Python This is what happened when I ran matrix multiplication in all three languages I have been doing a lot of implementations in C language for my …
Top answer
1 of 5
19

Ousterhout's article1 about scripting languages suggests that the higher level the programming takes place, the more productive the programmer is. If we take that, as Boehm says2, the number of lines a programmer can write in a given time is constant and not dependent on the language or its type (low level, system programming, scripting), one can easily believe the claim. The resulting instructions-per-source-code-line -ratio can be an order of magnitude (or several) better with scripting languages than with system programming languages.

As scripting languages heavily rely on ready-made utilities for common tasks (e.g. data structures, string manipulation), their main use usually is to enhance productivity with the cost of slower running speed by providing a syntax that's easy to learn and efficient to upkeep programs with. One doesn't resort to a scripting language when top execution speed is needed.

[1]: J. K. Ousterhout, Scripting: Higher Level Programming for the 21 Century, Computer (IEEE), 1998
[2]: B. Boehm, Software Engineering Economics, Prentice Hall, 1981

2 of 5
8

If you measure productivity as "time to write a specific simple program" then it depends so much more on programmer experience and quick mind than the language that you are really evaluating the programmer, not the language.

I believe timed code contests indicate that the language doesn't really matter for those kinds of tasks. There is no one language that wins such challenges easier than others (at least not if you allow for the relative popularity of languages).

If you measure performance as "the effectiveness of the best program" written in a given language, then it's even less language-dependent. See for example the results of the Galcon AI contest. The winner is written in Lisp. The next Lisp entry, however, is ranked #280. What does this tell us about the language's suitability for writing great AI efficiently? In my opinion, nothing. It just tells us that "bocsimacko" came up with and implemented the most effective algorithms. For the record, time was not a major factor in this contest - people had more than two months to develop their code.

Lastly, if you measure performance as "long-term cost of maintaining a project" then I think you're onto something. Especially if you hire only the best people for the job, and count cost in man-hours rather than dollars. I have a strong opinion on which languages are best for this, but having no hard evidence to link you to I'll leave this opinion out. Perhaps someone else has links for this type of performance.

🌐
Quora
quora.com › Which-programming-language-is-faster-Python-C-or-Java
Which programming language is faster, Python, C++, or Java? - Quora
Answer (1 of 3): In general, C++ is the fastest (compiled, low-level control), Java is in the middle (JVM adds overhead but is still optimized), and Python is the slowest (interpreted, high-level, great for quick development).
🌐
Reddit
reddit.com › r/godot › differences in speed between c, c++, python and java
r/godot on Reddit: Differences in speed between C, C++, Python and Java
December 13, 2023 -

I saw a video on YouTube about how much slower python could be compared to C++ in some instances, so I tried to test it myself, a simple program that counts from 0 to 1000,000,000 and displays the 1000,000,000 afterwards. The exception in my case was that I also tested this for C and Java, and found that as expected, C was faster than C++(not by much though) and python(by leaps and bounds), but to my surprise, Java was the fastest, even faster than C, how could this be?

Execution Times:

C - 2.815s C++ - 2.837s Python - 2m 1.451s Java - 0.861s

Top answer
1 of 13
125

Don't conflate Language and Run-Time.

Python (the language) has many run-time implementations.

  • CPython is usually interpreted, and will be slower than native-code C#. It might be slower than Java, depending on the Java JIT compiler.

  • JYthon is interpreted in the JVM and has the same performance profile as Java.

  • IronPython relies on the same .NET libraries and IL as C#, so the performance difference will be relatively small.

  • Python can be translated to native code via PyREX, PyToC, and others. In this case, it will generally perform as well as C++. You can -- to an extent -- further optimize C++ and perhaps squeeze out a little bit better performance than unoptimized output from PyREX.

    For more information, see http://arcriley.blogspot.com/2009/03/so-long-pyrex.html

Note that Python (the language) is not slow. Some Python run-times (CPython, for example) will be slower than native-code C++.

2 of 13
62

It is not really correct to ask why Python is slower than Java/C#. How fast is Java? Well, naive interpreters are around ten times slower than optimised compilers. I believe there is a Java bytcode interpreter written in JavaScript - that probably isn't very fast. So, the intended question appears to be "Why is the CPython language system slower than the equivalent Sun, IBM and Oracle JRE and Microsoft .NET runtime?"

I believe the correct answer is non-technical. The fastest Java and .NET runtime are faster because they have large full time technical teams developing them in performance-competitive environment.

Dynamic language systems are easy to implement. Any idiot can do it. I have. Static language systems are more complex to design and implement. A simple static system will tend to run much faster than the equivalent just-working dynamic equivalent. However, it is possible for highly optimised dynamic systems to run almost as fast. I understand some Smalltalk implementation were quite good. An often quoted example of a developed dynamic system is the MIT Lisp Machine.

In addition if the real grunt is being done by library code, then the language system may not matter. Alternatively, the language may encourage (or give time(!)) to develop more efficient algorithms which can easily wipe out constant factor performance differences.

🌐
Reddit
reddit.com › r/askprogramming › is java faster than python?
r/AskProgramming on Reddit: Is java faster than python?
January 31, 2024 -

Java is said to be much faster than python but there are different ways to run these languages (e.g. pypy for python, maybe dalvik for java). Is there any way python could be made faster than java?

Top answer
1 of 5
17
All things being equal, yes Java is usually faster than Python. That said, there are some pretty important qualifiers to that statement: Much of the "heavy lifting" done by Python is actually implemented in super-optimised C and C++ code which is (again, all other things being equal) faster than Java code, e.g. the Numpy library is a good example of this. Many programmes - e.g. most web apps - are I/O Bound (meaning that their performance is limited by the speed of input/output operations such as sending messages over the network or retrieving information from a database), meaning that, in practice, the speed difference between Java and Python is irrelevant, as the programme spends 99% of its execution time on I/O. Speed of implementation is often more important than speed of language. An inefficient Java implementation will often be orders of magnitude slower than an efficient Python on. Developer time is often relevant. Python advocates often state (rightly or wrongly) that as Python is more concise and "simpler" than Java, meaning that it allows Python developers to be more productive than developers using other languages, which is relevant if CPU cycles are cheaper than engineer wages.
2 of 5
5
Last time I checked, yes, by a huge margin. Java's execution is like reading shorthand (Compiler+JIT), python is like reading Shakespeare (Slow-ass interpreter). While there's good efforts made to make unofficial compilers that can convert Python or Java to Assembly, it's not easy since both languages rely on the VMs that run them to do things like automatic memory management, so the code you have inside your Python/Java program isn't the full story. You also need a garbage collector written in Assembly among other things. This makes it very difficult to turn into native code. That's the efficiency kind of performance. But there's also performance gains from leveraging more hardware that you also need to worry about. Even if you used these unorthodox assembly compilers, the language itself can hamper this performance, like the ability to multithread, which the Python spec lacked for a very long time.
🌐
ClarionTech
clariontech.com › blog › java-vs.-python-vs.-c
Java vs C vs Python for App Development: A Guide for CTO
December 6, 2024 - Python: Generally slower in CPU-bound tasks, with scalability brought through cloud platforms (AWS, Google Cloud) and frameworks like Django and Flask that help develop scalable applications in minimal time. C#: With its tight integration into the Microsoft ecosystem, C# excels in building enterprise systems that require both high performance and high security. Java: The most secure choice for large enterprises due to its built-in encryption tools, RBAC, and mature security libraries like Spring Security.
Address   The Hive, Raja Bahadur Mill Rd, Beside Sheraton Grand Hotel, Sangamvadi, Pune, 411001
Find elsewhere
🌐
Bluebird International
bluebirdinternational.com › home › java vs python performance
Java vs Python Performance
November 21, 2023 - The findings reveal that Java outperformed both C and Python, showcasing its speed and efficiency. However, it is important to note that the experiments utilized specific optimization flags for the C code.
🌐
Lasting Dynamics
lastingdynamics.com › home › build a software › python vs java, c++ & more: ultimate showdown in 2025-2026
Python VS Java, C++ & More: Ultimate Showdown in 2025-2026
1 month ago - C is the go-to for system-level programming, offering unmatched performance and control. Java dominates enterprise and Android development, providing scalability and reliability. Python leads in data science, AI, automation, and rapid prototyping, ...
🌐
Medium
timilehin-ty.medium.com › so-java-kinda-runs-like-python-why-is-it-10x-faster-2b12148918cb
So, Java Kinda Runs Like Python. Why Is It 10x faster?! | by Timilehin Tayo | Medium
May 25, 2024 - JIT Compilation: Java’s JIT compiler translates bytecode to optimized machine code at runtime; Python lacks a standard JIT compiler. Runtime Optimizations/Memory Management: The JVM performs advanced runtime optimizations especially regarding garbage collection, while Python’s CPython interpreter does not.
🌐
GeeksforGeeks
geeksforgeeks.org › java › c-vs-java-vs-python
C vs C++ vs Java vs Python vs JavaScript - GeeksforGeeks
C, C++, Java, Python and JavaScript are among the most popular and influential languages, but they serve very different purposes. C – Compiled, procedural. A low-level, high-performance language with direct memory access via pointers.
Published   August 12, 2025
🌐
Sololearn
sololearn.com › en › Discuss › 253502 › c-vs-java-vs-python-who-wins-
C++ vs Java vs Python who wins? 💪💪 | Sololearn: Learn to code for FREE!
Speed of Execution 🏃 🏃 🏃 Python’s execution speed is slower compared to Java and C++. Being dynamic and interpreted language, Python execution is slower. In comparison between Java and C++, execution speed of C++ is faster than Java.
🌐
Reddit
reddit.com › r/learnprogramming › java vs python vs c++
r/learnprogramming on Reddit: Java vs python vs C++
May 23, 2023 -

Hey y'all, I'll be needing to choose either one of Java, python, c++ or web programming for my second semester in electronics and communications but i have no idea where to start from

I've learnt all the basics of c programming in my first semester and i have to choose between the above mentioned for the second semester and it's really rattling my brain

Which of them would be better for a beginner to programming language and which would be most helpful in the future, if you'd have to say?

Thanks in advance!

Top answer
1 of 5
264
All of those languages are useful in different situations. Python's very popular with scientists, ML engineers, and the like. Non-programmers who need to write programs love it because it's approachable and has a plugin for basically anything. It's my favorite language for writing tiny, one-off programs and doing hackathons and coding competitions and stuff. Java's the workhorse of the corporate world. If you're writing a giant application full of business logic for a big corporation, and you're gonna maintain it for two decades, Java's still the default choice. C++ is the most powerful option. If you need something to go as fast as it can go, C++ is your default choice. But whole types of bugs around stuff like memory that are basically impossible to cause in Python or Java are really easy to cause in C++, and its error messages aren't so much legible as they arSegmentation Fault (core dumped). You can go far with any of them, and there's a good chance you'll end up learning all three at some point.
2 of 5
88
Love Python, but I’m in the “it’s better as your 2nd/3rd language” camp. The others are ‘harder’ and force you to gain a deeper understanding. Then you can pickup Python super easy. “Oh hey, it basically works the same but just does all the fiddly bits for me”. But you would know what those fiddly bits are, and can check the docs and be certain that behind the curtain it really is doing what you think it is. People who do it the other way around seem to have it harder, they don’t know how much Python is doing for them, why, or that it even is.
🌐
Quora
quora.com › What-is-the-difference-between-Python-C-and-Java-in-terms-of-programming-performance-intensive-applications
What is the difference between Python, C, and Java in terms of programming performance-intensive applications? - Quora
Python and Java differ in terms of performance because Python utilizes a dynamically-typed syntax, whereas Java uses a static grammar that simplifies code compilation. Therefore, Java is less likely to introduce errors.
🌐
Bright Data
brightdata.com › blog › web-data › java-vs-python
Java vs Python - Comparison Guide
November 8, 2023 - Instead, it reads the source code line by line and translates it to machine code on the fly during runtime. That introduces a significant overhead that makes it run slower than Java. Keep in mind, though, that Python’s performance can be improved with the external libraries written in C or C++.
🌐
GeeksforGeeks
geeksforgeeks.org › python › c-vs-c-vs-java-vs-python-vs-php
C vs C++ vs Java vs Python vs PHP - GeeksforGeeks
August 13, 2025 - C, C++, Java, Python, and PHP are widely used programming languages, each suited for different purposes. C: Compiled, procedural. A low-level, high-performance language with direct memory access via pointers.