|
|
|
|
|
by tsmarsh
3165 days ago
|
|
Java is slow compared to C/C++ and Fortran and comparable with SBCL / Rust. But it is fast compared to Python, JavaScript, PHP and Ruby. It's the rise of these languages that confuses me. They somehow got away with the 'fast enough' argument whilst Java is constantly being compared to languages that are designed for fine tuning for the target architecture. In my mind it is Java that is 'fast enough' and,with Java 8, very expressive. The continued success of these incredibly slow interpreted languages in enterprises where you need to buy servers feels like an anti-pattern. |
|
It was easy to find benchmarks showing that Java was fast. But Java turned out to be slower in every situation we might consider using it.
Command-line applications were slower because the JVM took ages to start.
GUI applications were slower, apparently because Python would use C-implemented widgets while Java would do much of the drawing itself.
Web applications were slower without any good excuse as far as I could see, but something in the application server that was the mainstream way of doing things added more per-request overhead than starting a whole new Python interpreter via CGI.
CPU-intensive operations (I remember image resizing in particular) were slower because, again, you ended up comparing the JVM against a well-written C extension.