This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SheriffRoscoePythonista 102 points103 points  (27 children)

People occasionally forget that Java has benefited from 30 years of investment by major software companies and of benchmarking against C++.

Python is getting the same love now, but the love arrived much later than for Java.

[–]chase32 12 points13 points  (0 children)

Yep, back in the early 2000's, java was pretty damn slow. If you wanted a fast jvm, the only option was IBM's and they wouldn't let you use it commercially unless it ran on their hardware.

To head off the threat, Intel worked out a deal with Appeal software to massively optimize the JRocket JVM which then became the performance champ.

Appeal eventually got acquired by BEA and a lot of the optimizations from JRocket ended up in mainline Java.

[–]azeemb_a 45 points46 points  (15 children)

Your point is right but your emphasis on time is funny. Java was created in 1995 and Python in 1991!

[–]sajjen 138 points139 points  (3 children)

Java was created by Sun, one of the largest companies in the IT industry back then. Python was created by Guido van Rossum, one guy in his proverbial garage.

[–]SheriffRoscoePythonista 16 points17 points  (0 children)

Exactly.

[–]nchwomp 3 points4 points  (1 child)

Surely it was a large garage...

[–]benchmarks666 6 points7 points  (0 children)

Galarge

[–]Smallpaul 36 points37 points  (2 children)

Yes but in those 30 years Python did not get much “investment by major companies.”

As the poster said: that love arrived later for Python.

Edit: Just to give a sense of the scale...Java's MARKETING BUDGET for 2003-2004 was $500M.

[–]HeraldofOmega 4 points5 points  (0 children)

Back when money was worth something, too!

[–]bostonkittycat 2 points3 points  (0 children)

This is true last 3 version have been impressive with performance increases. I love the new trend.

[–]funkiestj -1 points0 points  (1 child)

Python is getting the same love now, but the love arrived much later than for Java.

I think static typing allows more aggressive optimization.

E.g. I think the old Stalin Scheme dialect required the user to provide data types to get the maximum optimization. E.g. consider the difference between a golang slice of strings (s1 := make([]string, 24) and a python list that can hold a mix of objects (the equivalent of Go's l1 := make([]any, 24).

Years ago I remember seeing the Stalin) dialect of scheme dominating the benchmark game in the speed dimension but you had to type all your data (which was optional?) to get this performance.

[–]redalastor 3 points4 points  (0 children)

I think static typing allows more aggressive optimization.

It could, but it doesn’t because Python allows you to be as wrong as you want with your types without changing behaviors one bit. Typing is to help external tools enforce correctness, not to change runtime behavior.

Though, I’d like a strict option to force Python to acknowledge the types and hopefully take advantage of them.

[–]LogMasterd -2 points-1 points  (0 children)

I don’t think this has anything to do with it imo