Do multi-threaded workloads, which a lot of high performance workloads are, Java has also the potential to be faster than C++ due to garbage collection and threading aware optimizations it can make. Memory allocation, especially when memory lifecycle spans threads can be expensive in C++.
"A JVM does that???" by Cliff Click is a good introduction on what can go in the background.