
John Lamb wrote:
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.
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
C/C++ is 25-50% slower than FORTRAN in (heavy floating point) benchmarks I have run over the last 15 years on everything from CRAY X-MP's down to modern P4 based systems, especially with commercial compilers (Convex, SGI, Intel & PGI), & double especially comparing gcc to commercial F77/F90. If your work needs that last iota of speed, there is no substitute for F77, warts & all.