Constantin Teodorescu wrote: | I was testing kaffe 1.0b3 and jdk 1.1.7 speed on a Linux RedHat 5.1 i386 | Pentium 233 MMX machine 64 Mb RAM. | I am attaching the tiny program used for speed test. Some integer, | string, hashtable operation. | | I was expected that kaffe VM with jit should run quicker than the | original jdk 1.1.7 but , strange, it was slower. | jdk 1.1.7 finished the program in 14 seconds, | kaffe 1.0b3 finished it it 30 seconds. | | I was curious to see also how the original SUN jre1.1.7B for Windows 95 | works. They say that it is using a JIT from Symantec. | Testing the same program, even on a Pentium 150 MHz machine, the test | was finished in 5 seconds. Wow !!! These results are reasonable and easily explained. JIT, in general, should be faster than interpreted. However, there is overhead: the JIT must compile the code to begin with. If it takes longer for the JIT to run than you save on the code, then overall, JIT will be slower. That's why newer VMs such as Sun's HotSpot only JIT when they "know" that a method will be frequently used. As far as the Windows JIT goes, another technique is that all of the standard class libraries can be pre-JITted and stored on disk. Kaffe does not preprocess anything in java.*, so we JIT everything from scratch each time. (We should have an option to pre-JIT the standard class libraries. I even have a wierd idea of how it might work.)