Isn't Java's JIT is better than static optimizations of C++ because of runtime data is also very important for optimizations? Also inlining of comparison functions usually already done in V8...
That said, yes, the runtime information provides really valuable information. That's why PGO is a thing for C++.