I didn't choose Java for my backend just because it uses too much RAM. The VPS(s) with large RAM are expensive.
Well, I guess I could have also done Structure of Arrays implementation and additionally avoided 'new', but it's not Java anymore at that point, is it? Easier to just write it in another language at that point.
Generic branchy business logic type code is indeed about as fast in C++ as in Java. But that doesn't hold for all types of software.
How fast is Java native floating point math vs. C++/intrinsics? Last I checked, C++/intrinsics seemed to have 2-8x lead. What about sorting? Last I checked C++/intrinsics sort seemed to be about 20-50x faster versus Java.
Some comparison:
http://unriskinsight.blogspot.com/2014/06/fast-functional-go...