Assembly exceles at tiny problems of minimal complexity.
C excels at ertain kidsn fo medium scale problems.
Java exceles at comples problems.
Any code that you could comfortably write in assembly is almost certainyl to small and trivial a case to give any meaningful Java
results.
Its that simple.
P.S. Java beats the crap out of any C but MSVC on WIn32 for allcoation/deallocation. Any algorithym whioch does heavy constant allocation/deallocation ash erpformed better in Java then C for a long time. For some reason I don’t fully understanbd, I’ve seen three C v. Java FFT shoot outs and in each case the final maximally tuned Java beat the pants of the maximally tuned C.
You know what IQ tests measure, right? The abiltyi to take an IQ test. SImilarly microbenchmarks measure a systems ability to run the microbenchmark and thats about it. They can be useful in Java ocne you have ALREADY profiled a real app and found a bottleneck in helping probe the system to understand exactly what is causing that biottleneck, but thats about it. Out of context they mean almost nothing.
Not surprising if we would consider that algorithms were simple and possible compiler optimalization of C++ was possible to do in Macro ASM as well after education from dissasembly. ~_^ (Note I didn’t included starting times or ASM would win too easily)
Best answer is it depends on programmer and computer on what it would be runned. Java programs are consistent enough to speed up, and very likely don’t crash, if they are used after several years on a more recent CPU. (Slow incorporation of new things and late deprecations might be sometimes advantageous.)
Because majority of future computers would be multicore, all programs should support multiple threads. And don’t forget that Mickerosoft might actually improve windoze into something that would somewhat suport preemptive multithreading. (It’s still event based system that would have problems with future CPU.)
If you would like to talk with C++ persons, you might cite this:
T"he reasons for 68 kb code for a simple string on the screen isn’t just a problem with STL, but a, how to talk about it, behaviour that is hard to accept by an assembly programmer. (To put it simply, you not only get your chicken, you get also your aunt, your elephant, and your ship. They are nicely lined just behind your back so you will not see them. It also add a nice box with message on top of that.)"
(The message is something about .net. It’s poetical for purely C++ program.)
It would be also nice to see some examples.