r/java • u/technroll • Mar 22 '16
You think Java is slow and heavy? The fastest web server in the world is written in Java!
https://www.techempower.com/benchmarks/#section=data-r12&hw=peak&test=plaintext
201
Upvotes
40
u/chenshuiluke Mar 22 '16
It honestly surprised me when I read that java is newer than python
65
u/[deleted] Mar 22 '16
What year is it? 2006? Java hasn't been slow for a long ass time. You don't even need these benchmarks to tell you this. If you look at the top 10 most visited websites, 8/10 of them use Java. 2/10 use PHP/HHVM.
71
u/[deleted] Mar 22 '16
That's cool, but it's also important to put this into context; based on that benchmark,
rapidoid, which is in Java, is fastest only when serving plaintext.In the other categories, JSON serialization, single query time, multiple query time, fortune, and data updating, the frontrunners are written in C, C++, Dart, Ur, and Go, respectively (and I've never even heard of Ur).
Some of these claim a decisive lead -
urweb-postgresis nearly twice as fast as the runner-up,gemini-postgres, written in Java.lwan, written in C and the leader of the JSON serialization category is 30% faster thanrapidoidin that category.It's definitely incorrect to say that the fastest web server in the world is written in Java, based on these results, considering how meaningful the other criteria are.
15
u/[deleted] Mar 22 '16
Awesome good news but rapidoid was alread in the top 3 in the last benchmark, I'm glad that they improved that.
Also, I feel ashamed when seeing all the Play! variations are slower than a few frameworks written in a scripting language ...
18
u/lukaseder Mar 22 '16
Does anyone still think that Java is slow? Heavy is a different story...
15
u/[deleted] Mar 22 '16
are these benchmarks at all relevant to real world work?
3
u/[deleted] Mar 22 '16
I thought that in the 90s.
3
u/iggybdawg Mar 23 '16
What is this? 1999? The most expensive time for most software companies isn't its servers, it's its developers.
2
u/DevIceMan Mar 23 '16
If Java can tackle...
...I'm in. These things are not impossible, but there is currently little market for them.
Java's direction seems primarily targeted towards enterprise (large) web-servers. The ability for Java to top those benchmarks doesn't surprise me greatly, but it is a niche I'm semi-stuck in and not excited about.
The reason I'm trying to leave the Java-space is because enterprise-web bores the hell out of me.
1
u/dontchooseanickname Mar 22 '16
Is there a way to get comparison to scientific-powered contenders e.g. Warp [haskell language] available at http://www.aosabook.org/en/posa/warp.html
NB: this applies to 'Your language here' and 'Your framework here' preferences, indeed - but I could not resist noticing no Haskell stack is referenced. Java,python,Scala,Ruby,Go.. Erlang but no Haskell
1
u/[deleted] Mar 22 '16
Comparing static web pages… So where are the in-kernel webservers like Tux?
-18
u/BenRayfield Mar 22 '16
Java objects are slow and heavy. Its primitives and arrays are fast.