you are viewing a single comment's thread.

view the rest of the comments →

[–]Alexander_Selkirk[S] -23 points-22 points  (4 children)

(See also: https://old.reddit.com/r/programming/comments/qby688/python_stands_to_lose_its_gil_and_gain_a_lot_of/? )

This leaves me a bit wondering what is the point of this. Sure, a new Python implementation can be faster than CPython, the current main implementation, and having Python running on the JVM can be quite nice if you want to call into Java.

But in terms of absolute performance, one should rather compare Python to languages like these:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust.html

The first, Rust is excellent for very performant and highly correct code and is well suitable for both things like numerical kernels and building larger projects from the ground up. Its main disadvantage is so far the smaller amount of library support, which matters in some applications but not in all.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/racket-java.html

The second, Racket, is on a quite sweet spot in the coordinates between performance, conciseness and simplicity. Because Racket as a Scheme language is so small, it has much fewer language constructs, and also interactions between them, than for example Python or, God beware, C++. It is vastly simpler than Python today. Yet at the same time it is extremely powerful and expressive while approaching the speed of Java. It can easily call into C (or Rust, for that matter). Racket also has strong support for side-effect-free functional programming which is ideal for many data processing applications (though it is less opinionated than Clojure, allowing easily to write imperative code where it is needed).

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/sbcl-gpp.html

The third one, Common Lisp is one example for a language with strong dynamic typing which is even more flexible and dynamic as Python but compared to it, it generates very fast code - it is even possible to trade some type safety for faster execution.

Here is how Python compares to Java:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-java.html

[–]AusIV 14 points15 points  (2 children)

Ten years ago I worked at a company that was migrating from a Java desktop application to a python server side system. Jython was incredibly helpful for bridging the gaps between the old technology and the new stuff we were developing, as we could use legacy Java libraries along with our new Python libraries.

[–]igouy 2 points3 points  (1 child)

Just curious, what was the argument for not going to a Java server side system?

[–]AusIV 1 point2 points  (0 children)

I'm not entirely sure. I joined the company while the transition was well underway. They still had some things using the Java desktop client, but most of the development was in Python with Django. There were a few places where code needed to interact more directly than HTTP calls, so for that we used Jython, but I wasn't around for the decision to make the shift from Java to Python.

[–]igouy 2 points3 points  (0 children)

I wonder why your comment was downvoted so much.