That is a bit surprising given that it looks like that only runs for 5 seconds? But there's not much code there and it's all in a loop. My recollection is that the JIT compiler will step in after x repeated executions, which will happen pretty quickly here. And the compiled code as the potential to be as fast (or maybe faster) than any other compiled code. Without looking too hard, it doesn't appear that there's really any object allocation going on inside that loop, so the overhead of Java managing objects on the heap appears to be a non-factor here as well.
So I think it would certainly be possible that Java would be similar to any other compiled language, if the test ran sufficiently long such that the time to get the code JITed is relatively short compared to the overall execution time. And IBM did a whole lot of work to speed up JVM startup. Still, it is surprising to me that it works that well over a 5 second test. If other platforms don't JIT as quickly or aggressively, or if their JIT compiler isn't as smart as IBM's then their results may not be the same. Similarly, if the IBM C compiler isn't as optimized as it is on other platforms, it might underperform. Scott Chapman ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN