Steven T. Hatton wrote:
Depending on the estimate C++ can run 5-15 times as fast,
I have a genuine mistrust of benchmarks, but I would like to know what sources you have on this. The general philosophy of Java is to write code that is intelligible before even thinking about efficiency.
I don't recall offhand because I agree that bencharks are not that important. I found one packing algorithm I wrote in both java and C++ took about 5 times as long in java than in C++ compiled withouth optimisations. For a more extreme comparison, try big matrix multiplication and compile the C++ code -O3 -mfpmath=sse -msse -msse2 -maling-double. But, as you suggest, speed is usually not the issue. Robust and quick development is. That's where I think java wins. I'm hopeful that what gcj will do is allow java to run at similar speeds to C++ and FORTRAN. Of course that won't convince all C++ programmers to change. I still get FORTRAN programmers ask me why I use C++ (they still think it's much slower) - and they can't even recurse! -- JDL Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.