I'd say no one will be able to tell. But since the app is small and computationally intensive, I'd say it would be very little additional work to port it from Java to C++ (or vice versa), so you can actually test and see for yourself.
Java could conceivably be faster. The JIT compiler uses runtime information to recompile critical portions of the code; C++ compiler does not have this kind of information at hand when compiling.
Hendra Kurniawan wrote:let's say I want to make a simple app to generate permutation. which app would run faster on the same machine and OS (intel i3 win 7-32 bit), the one running in java 7 or borland C++?
Like Martin, I doubt if you'd be able to notice. C++ gives you more scope for your own optimization, but less for the compiler; and modern compilers are often far better than we are when it comes to micro-optimization.
Suck it and see...and heed the words of Wulf (see below).
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here