Both Java and C/C++ are strongly typed languages, which give a lot of information to the compiler and (in the case of Java) runtime. The question here is how much optimization people can do on a loosely typed language like JavaScript... Apparently they can do quite a bit because JS today is screaming faster than a few years ago.
You would expect that, all things being equal, the languages with a runtime (including JavaScript) should beat out those without because they can do things that you can't do statically. People who religiously believe that Java couldn't beat C/C++ simply failed to understand what is going on... Both languages have about the same amount of info, both have a compiler, but one has a runtime that is also a compiler that can go on analyzing and optimizing as the program runs... Which one wins in the long run? Duh.
So the question then is whether JS having a runtime can allow it to work around the lack of type information in the code. Runtimes can do things like observe the type usage and "optomistic inlining" that in some cases may compensate for the loose types. But there may always be cases where there is a penalty for loose types.