| 
     
      
      
      From: Miguel <mt...@mt...> - 2004-05-22 08:49:56
      
     
   | 
Geoff wrote: > (begin rant) I'll also admit a significant bias. One reason I code in > C++ is that I hate the performance penalty of Java. As I'm doing some > conformer searches of a good number of molecules, I'd prefer to see > *fast* coordinate generation and molecular mechanics. (end rant) Geoff, I believe that the performance penalty for working in Java is neglig I have quite a bit of experience with systems-level programming, and performance is extremely important to me. A year ago, in preparing to write the 3D graphics engine, I did some serious benchmarking to to compare Java performance with C performance. The benchmarks emulated the CPU-intensive core operations of a software graphics z-buffer implementations. One of the things I was particularly interested in was determining the impact of using array-indexing-with-bounds-checking vs. pointers. My general findings were: - Overall, the performance penalty for programming in Java was about 10% - the worst benchmark was about 20% - others were only 0-5% slower I also tried compiling with the gcj Gnu Compiler for Java that generates machine instructions. I found: - there was no runtime performance difference between the Sun hot-spot runtime compiler and precompiled gcj code - turning off array bounds checking (an option with gcj) in the context of a realistic benchmark had no measurable performance impact. Other comments: - these tests did not involve the Java class libraries (which may be slow) - I suspect that Java makes it easy for inexperienced programmers to build systems with relatively poor performance because of heap memory allocation/garbage collection. But, I honestly don't think that there is any significant performance impact for writing systems in Java. Miguel  |