Skip to content

Comment on Ask HN: Python vs. Java - runtime performanceparent

Comments

As I see it the difference is that Python is a scripting language which can be used to corral functions in shared libraries. Java is a programming language with a edit-compile-debug loop. You should get things working faster in Python but get a bit more speed with Java - eventually.

I have chosen Python for a similar large, complex, evolving application - in constant use whilst under development. The key is the speed with which I can write working, tested code. With an earlier (different) project using Java, I found the APIs and debugging being a huge drag on productivity.

Surprisingly I have found performance mostly acceptable. A small number of bottlenecks were addressed by rewriting specific modules as services in C and calling them.

As it is said: "Premature optimisation is the root of all cumbersome system designs". Get the data structures right first, then implement clean algorithms. Only when you can prove that there is a bottleneck and you can't speed it up sufficiently by throwing more hardware at it, only then do you rewrite as little as possible in C/C++.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.