Benchmark | JDK 1.0.2 | Kaffe |
Guava | Toba |
Arithmetic | (sec) | (sec) |
(sec) | (sec) |
Add ints | 3.236 |
18.765 | 0.150 |
0.117 |
Mult Ints | 3.496 |
17.803 | 0.216 |
0.185 |
Add Doubles | 4.123 |
23.729 | 0.508 |
0.274 |
Mult Doubles | 4.156 |
23.105 | 0.488 |
0.279 |
Class Access |
Read integer instance variable |
2.796 | 15.294 | 0.172 | 0.102 |
Call to method in same object | 3.119 | 17.884 | 0.354 | 0.235 |
Call to method in another object | 3.741 | 22.400 | 0.410 | 0.268 |
invoke interface method | 4.130 | 24.726 | 1.397 | 1.405 |
Throw Exceptions |
local |
5.026 | 19.424 | 17.634 | 1.325 |
non-local |
7.315 | 34.722 | 33.268 | 6.616 |
Catch exception past 1 intervening catch
clause | 11.516 | 37.006 |
39.609 | 8.079 |
Catch exception 10 calls away | 41.245 | 392.769 |
124.182 | 8.177 |
Synchronization - Single-threaded program |
synchronized blocks | 16.088 | 12.400 |
6.349 | 1.683 |
synchronized methods | 15.914 | 19.852 |
6.587 | 2.546 |
Synchronization - Multi-threaded program |
synchronized blocks | 16.135 | 11.867 |
6.259 | 3.519 |
synchronized methods | 16.114 | 20.092 |
6.518 | 4.596 |
Miscellaneous Benchmarks |
Empty Loop | 1.115 | 4.547 | 0.071 | 0.033 |
Assign to Integer Array | 2.781 | 12.357 | 0.294 | 0.186 |
Runtime.gc() | 0.022 | 0.025 | abort | 0.403 |
3 Threads doing 10,000 yields | 2.724 | 3.284 | 1.952 | 0.485 |
100,000 1-byte writes | 4.671 | 20.039 | 3.898 | 3.125 |
1 100,000 byte write | 0.009 | 0.008 | 0.009 | 0.006 |