Sorry for the stupid question, I just have strange question.
If CPython interprets Python source code and saves them as byte-code in .pyc and java does similar thing only with compiler, In next request to code, interpreter will not interpret source code ,it will take previously interpreted .pyc files , why python is slower here?
Both PVM and JVM will read previously saved byte code then why JVM executes much faster than PVM?
Sorry for my english , let me know if u don't understand anything. I will try to explain
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?
Videos
What does Java do better than Python?
Hi everyone, so as long as I know, Python is an easier language to start learning programming, however, I might have a greater oportunity of getting a kind of internship or even (long term goal, crossing fingers) a job at a company that works with Java because of connections.
What is your experience?
It's 2025, and I'm at a decision point in my programming journey. I want to dive deep into one language and can't decide between Python and Java.
Here's my context: i am a developer with 10 year experience in java and 5 years in python
-
Python: It's dominating fields like AI/ML, data science, web development, and automation. With its growing libraries and frameworks, it feels like a must-know for cutting-edge tech.
-
Java: Despite being older, it's still a powerhouse for enterprise systems, Android development (with Kotlin in the mix), and large-scale backend solutions. Its stability and performance are undeniable.
After December we will move away from Assembly at work (I work there as an apprentice and they want me to learn it, they don't actually use it). I get to choose between Java and Python. I will learn the other one later anyway, but in the beginning, which should I take? I work there as a Software developer with only very little pre knowledge.
Python is more like a handy swiss army knife Java is full blown war Tank. I would prefer java.
I had a lot of luck learning the easier things like decision statements and loops with python, but learning OOP and some more complex things was a lot easier to understand with Java. Don’t think you need to learn just one, focus on the concepts!
I will just be to the point, I just find it fun to learn how to code and want to be able to independent create code create things without error. There’s an interval between where I learn hello world then language I don’t understand. It’s very small and I don’t know where. Is it all important to learn?
What language is more advantageous, Java or Python? What do you think?
I've spent the last year working as a software engineer writing a web-app in Python. The interesting part is I'm not actually part of the IT department and they (a year ago) said I could use Python on the understanding I would get no support from them, they were advocating PHP. Due to my own experiences with the two and the project I would be undertaking I picked Python.
Fast forward to today and some other people from IT have performed a code review as the project has been far more successful than they anticipated and people are sitting up and taking notice. The main question they're asking has to do with Python, why am I using it? I've not had a chance to meet the questioners yet but I'm told some of them code in Python themselves and that the main suggestion coming from IT is to use Java instead.
I've had some exposure to Java but not a lot. I understand it's compiled to Byte-code, uses the JVM etc and that it's very popular in more established businesses. What I don't know (beyond what a simple Google search will tell me) is why I would pick one or the other.
I'm not after "Java is better than Python", I'm genuinly curious to hear from people experienced in both which aspects of each make them good for different problems. Is it that Java is a lot better past the 10k loc mark? Is it that Java is so much faster than Python? I think I've covered everything, if not please let me know and I'll answer it.
I see python like most dynamic languages (compiles at runtime), it's fast to develop in. There are good libraries in it and you can get products going really quickly. But when you start getting to points where you have massive load on the system, python will probably not behave as nicely as Java could.
I see Java being closer to C++ than most of the popular dynamic languages out there (those being PHP, Python, Perl, Ruby, etc...). Java does a lot of compile-time checking for us, specifically around types (static typing). For most small projects, dynamic typing that you get in languages like Python works just fine, but when you start getting a lot of code with a lot of developers working on it, dynamic typing becomes troublesome.
Beyond typing, speed can be a major factor. Java allows you to have some pretty close-to-hardware control over how the language behaves, especially when you are multi-threading.
Java is a good language, but it is a bit more verbose than other languages, and can take more time to prototype out new ideas in. If you are re-writing some existing program to get better performance, Java is definitely a good choice.
(Go-lang would probably be the second language I would look at if speed was an issue).
Edit: To add, everyone has their language preferences. I used to be a Java only fanboy, but since I've picked up a few other languages, I'm starting to see Java's weaknesses. A lot of the time, it is better for a company to choose whatever language the team is comfortable with so there isn't as much training that is required for others to work on the code.
Writing a webapp in Java takes a much steeper learning curve, and needs much more experience. Writing it in python is perhaps the faster way. Maintaining the code, that's something different - if further modifications were needed, it might be harder for the python code. Just might be, because a seasoned programmer might develop good enough python programs (he could do that in Basic too if he wants).
But if the application starts to grow, and a lot too, then python runs out of control soon. Several hundreds of thousands of lines of code, that's not for python. Several thousand, it's still fine.
So it all depends, what you are after. Besides, if you are experienced in Python but not so in Java, then the bigger risk is to switch to a new technology.
Each has its own merit, and it depends also on your intentions. If you're going to move to the IT business as a developer, then I'd say Java has a better perspective. But if it was just a hobby project (even if it is useful for others), then I'd say stick with what you know better. One can do most everything with python (and with Java too).
Hi all,
As someone who is relatively knew to both Python and Java I'm just now deciding which language I want to explore deeper into.
As far as I can tell from my research the main benefits to Python are that
-
It is very user friendly, and
-
There are lots of modules available that are interesting to experiment with.
However, admittedly, I am drawn more to learning Java. As a general consensus it seems to be:
-
much faster
-
heavily embedded in the industry
I hear from various sources online that Java seems to be on the way out and Python on the way in but I don't know if that's actually the case? I can't imagine, due to how heavily used Java is, that it is going anywhere anytime soon.
Another thing everyone talks about is dynamically typed vs. statically typed. Perhaps it was just because I started with Java but I feel far more comfortable using a statically typed language over Python. Am I missing out on something here or do other people feel the same?
Also, just in terms of future job possibilities and the use of Python in the industry I would assume that Java or even C / C++ would be more likely to propagate throughout the future just because of the speed? Or am I just over exaggerating how important the speed of the application actually is?
Any opinions you have on this question are greatly appreciated :)
Thanks.
Hello! I'm a bot!
It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python regardless of how advanced your question might be. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.
Show r/learnpython the code you have tried and describe in detail where you are stuck. If you are getting an error message, include the full block of text it spits out. Quality answers take time to write out, and many times other users will need to ask clarifying questions. Be patient and help them help you.
You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.
README | FAQ | this bot is written and managed by u/IAmKindOfCreative
This bot is currently under development and experiencing changes to improve its usefulness
You are definitely overvaluing speed (and probably exaggerating the speed difference).
Python has been one of the fastest growing languages in terms of job prospects, but it entirely depends on what you want to do. If you want to write GPU drivers, Python isn't the language for you. But if you plan to do data science or full stack web development, then Python may well be the right language.
You seem to be desperately trying to find some justification to choose Java. If you want to choose Java, just do so. You don't need to agonize over static/dynamic typing or other trivialities of the language to justify it. Java isn't going away anytime in the foreseeable future.
I've spent the last year working as a software engineer writing a web-app in Python (using Pyramid). The interesting part is I'm not actually part of the IT department and they (a year ago) said I could use Python on the understanding I would get no support from them, they were advocating PHP. Due to my own experiences with the two and the project I would be undertaking I picked Python.
Fast forward to today and some other people from IT have performed a code review as the project has been far more successful than they anticipated and people are sitting up and taking notice. The main question they're asking has to do with Python, why am I using it? I've not had a chance to meet the questioners yet but I'm told some of them code in Python themselves and that the main suggestion coming from IT is to use Java instead.
I've had some exposure to Java but not a lot. I understand it's compiled to Byte-code, uses the JVM etc and that it's very popular in more established businesses. What I don't know (beyond what a simple Google search will tell me) is why I would pick one or the other.
I'm not after "Python is better than Java", I'm genuinly curious to hear from people experienced in both which aspects of each make them good for different problems. Is it that Java is a lot better past the 10k loc mark? Is it that Java is so much faster than Python?
I think I've covered everything, if not please let me know and I'll answer it.
If you ignore all the other language features and characteristics, and compare them solely on the basis of speed or performance, then which one is better? Python or Java?
In 2010, most were of the opinion that Java is faster (or at least the most optimized Sun Java implementation at that time was faster than the cpython implementation).
Today, we have OpenJDK as standard. So, how do today's OpenJDK compare with today's cpython?
What scenario calls for which language over the other? Both have similar capabilities but which of the two would be superior as far as for a full stack dev to know?
Hi everyone, I'm trying to decide between java and python based on future job demand and long term career growth. I also want to start learning databases and would like advice on which one to focus on such as PostgreSQL, MySQL, or a NoSQL option like MongoDB. My goal is to build strong job relevant fundamentals.