The following results compare the Java Grande section 1 benchmark timings of Jenga, a PowerBook 400, to a PowerBook 667 ("Unk PB" or just "PB"), to an unspecified Acer system (it's in mail, somewhere.)
The important points are:
- For most tests, the PowerBook 400 is only .3 to .6x the performance of the PowerBook 667. That's more stark than I was expecting, but more than made up for by differences in on-chip cache, faster access to main memory during cache misses, and overal faster performance.
- In several tests, there are bizarre and strong differences in cost between the intel platform and
the G4 systems under test. These scale, and are predictable: they reflect specific problems with the Mac
implementation of the JVM, and are not a testament that Intel systems under test are somehow thousands
of times faster at performing a given operation. Specifically:
- Casting of longs to doubles is bizarrely expensive in the Mac JVM. No good reason I can think of.
- Array creation looks frighteningly unoptimized, with allocations for 'aligned' values being cheaper than unaligned ones. This should be transparent, and the results of any of these allocation should result in aligned values.
- Exception:Throw test. God only knows.
- poor performance of Math:Random test, given what it is and does.
- Memory allocation is noticeably more expensive in the Create:Object examples. This is, again, a fundamental issue - and the 0.3x improvement of the PB to the Acer is almost guaranteed to be the 133MHz main memory bus over the 100MHz one.
- General poor performance of Math:*. Again, given that we've got more GP registers to work with, and the relative integer performance between the systems, the math numbers in specific cases are well out of line with expectations.
- Poor performance of Instance, InstanceOfAbstract - these are common tests that will have widespread impact on high level application performance.
- Poor performance of serial reading/writing - again, frighteningly bad sign for anyone doing a wide range of Java development, this just shouldn't happen.
I find it difficult to accept, given the otherwise relative performance of these systems, that these are anything other than fundamental problems with the VM implementation. Specifically:
- Memory allocation messiness; specifically with the way that the array tests show unusual, unoptimal allocation, whereby small allocations suffer greatly in performance.
- Behavior of fundamental instance/instance of abstract, as well as other key fundamental areas, suffers from huge performance degradation. Those places must be corrected in order for higher-level applications which make heavy use of that functionality to behave in predictable ways; just as allocation performance has an effect on all applications, so does instance validation and the cost of casting.
- Inexplicable, sudden drops in performance for what appear to be simple operations of casts on primitive types.
- Awful serialization performance. Tell me this is due to endian issues...
| TEST NAME | Jenga | Unk PB | Acer | (Acer / Jenga) | (Acer / PB) | (Jenga/PB) | |
| Section1:Arith:Add:Double | 1.20E+08 | 2.01E+08 | 4.24E+08 | 3.5x | 2.1x | 0.6x | |
| Section1:Arith:Add:Float | 1.11E+08 | 2.18E+08 | 4.24E+08 | 3.8x | 1.9x | 0.5x | |
| Section1:Arith:Add:Int | 3.23E+08 | 1.10E+09 | 1.07E+09 | 3.3x | 1.0x | 0.3x | |
| Section1:Arith:Add:Long | 1.02E+08 | 2.83E+08 | 2.17E+08 | 2.1x | 0.8x | 0.4x | |
| Section1:Arith:Div:Double | 1.30E+08 | 2.61E+08 | 1.43E+08 | 1.1x | 0.5x | 0.5x | |
| Section1:Arith:Div:Float | 1.15E+08 | 2.38E+08 | 1.43E+08 | 1.2x | 0.6x | 0.5x | |
| Section1:Arith:Div:Int | 1.74E+07 | 5.55E+07 | 1.53E+08 | 8.8x | 2.8x | 0.3x | |
| Section1:Arith:Div:Long | 2.19E+06 | 5.90E+06 | 1.48E+07 | 6.7x | 2.5x | 0.4x | |
| Section1:Arith:Mult:Double | 1.30E+08 | 2.62E+08 | 2.57E+08 | 2.0x | 1.0x | 0.5x | |
| Section1:Arith:Mult:Float | 1.15E+08 | 2.38E+08 | 3.21E+08 | 2.8x | 1.3x | 0.5x | |
| Section1:Arith:Mult:Int | 1.94E+08 | 6.34E+08 | 2.98E+08 | 1.5x | 0.5x | 0.3x | |
| Section1:Arith:Mult:Long | 4.35E+07 | 2.28E+08 | 9.77E+07 | 2.2x | 0.4x | 0.2x | |
| Section1:Assign:Other:Array:Class | 2.75E+07 | 9.01E+07 | 1.00E+09 | 36.4x | 11.1x | 0.3x | |
| Section1:Assign:Other:Array:Instance | 2.67E+07 | 6.42E+07 | 1.00E+09 | 37.5x | 15.6x | 0.4x | |
| Section1:Assign:Other:Scalar:Class | 4.97E+07 | 1.37E+08 | 3.74E+09 | 75.3x | 27.3x | 0.4x | |
| Section1:Assign:Other:Scalar:Instance | 3.77E+07 | 1.04E+08 | 2.32E+09 | 61.5x | 22.4x | 0.4x | |
| Section1:Assign:Same:Array:Class | 9.02E+07 | 1.65E+08 | 9.85E+08 | 10.9x | 6.0x | 0.5x | |
| Section1:Assign:Same:Array:Instance | 4.75E+07 | 8.52E+07 | 5.31E+08 | 11.2x | 6.2x | 0.6x | |
| Section1:Assign:Same:Array:Local | 9.59E+07 | 1.71E+08 | 1.00E+09 | 10.4x | 5.8x | 0.6x | |
| Section1:Assign:Same:Scalar:Class | 1.83E+08 | 4.36E+08 | 3.42E+09 | 18.7x | 7.8x | 0.4x | |
| Section1:Assign:Same:Scalar:Instance | 1.95E+08 | 4.36E+08 | 1.72E+09 | 8.8x | 3.9x | 0.4x | |
| Section1:Assign:Same:Scalar:Local | 5.64E+08 | 1.74E+09 | 4.11E+09 | 7.3x | 2.4x | 0.3x | |
| Section1:Cast:IntDouble | 3.54E+07 | 9.34E+07 | 0.0x | 0.0x | 0.4x | ||
| Section1:Cast:IntFloat | 3.49E+07 | 9.31E+07 | 4.40E+09 | 126.0x | 47.2x | 0.4x | |
| Section1:Cast:LongDouble | 6.36E+06 | 1.46E+07 | 2.72E+10 | 4279.6x | 1858.4x | 0.4x | |
| Section1:Cast:LongFloat | 5.76E+06 | 1.33E+07 | 2.72E+10 | 4722.2x | 2044.5x | 0.4x | |
| Section1:Create:Array:Float:1 | 8.25E+06 | 1.74E+07 | 3.05E+07 | 3.7x | 1.7x | 0.5x | |
| Section1:Create:Array:Float:2 | 7.24E+06 | 1.24E+07 | 2.24E+07 | 3.1x | 1.8x | 0.6x | |
| Section1:Create:Array:Float:4 | 6.44E+06 | 1.07E+07 | 1.72E+07 | 2.7x | 1.6x | 0.6x | |
| Section1:Create:Array:Float:8 | 4.85E+06 | 7.71E+06 | 1.14E+07 | 2.3x | 1.5x | 0.6x | |
| Section1:Create:Array:Float:16 | 3.69E+06 | 5.62E+06 | 6.89E+06 | 1.9x | 1.2x | 0.7x | |
| Section1:Create:Array:Float:32 | 2.40E+06 | 3.87E+06 | 3.84E+06 | 1.6x | 1.0x | 0.6x | |
| Section1:Create:Array:Float:64 | 1.28E+06 | 2.07E+06 | 2.03E+06 | 1.6x | 1.0x | 0.6x | |
| Section1:Create:Array:Float:128 | 6.79E+05 | 1.23E+06 | 1.12E+06 | 1.6x | 0.9x | 0.6x | |
| Section1:Create:Array:Int:1 | 8.47E+06 | 1.74E+07 | 2.90E+07 | 3.4x | 1.7x | 0.5x | |
| Section1:Create:Array:Int:2 | 7.21E+06 | 1.27E+07 | 2.24E+07 | 3.1x | 1.8x | 0.6x | |
| Section1:Create:Array:Int:4 | 6.71E+06 | 1.07E+07 | 1.72E+07 | 2.6x | 1.6x | 0.6x | |
| Section1:Create:Array:Int:8 | 4.96E+06 | 7.71E+06 | 1.14E+07 | 2.3x | 1.5x | 0.6x | |
| Section1:Create:Array:Int:16 | 3.68E+06 | 5.63E+06 | 6.89E+06 | 1.9x | 1.2x | 0.7x | |
| Section1:Create:Array:Int:32 | 2.45E+06 | 3.87E+06 | 3.84E+06 | 1.6x | 1.0x | 0.6x | |
| Section1:Create:Array:Int:64 | 1.32E+06 | 2.07E+06 | 2.03E+06 | 1.5x | 1.0x | 0.6x | |
| Section1:Create:Array:Int:128 | 6.86E+05 | 1.23E+06 | 1.11E+06 | 1.6x | 0.9x | 0.6x | |
| Section1:Create:Array:Long:1 | 7.15E+06 | 1.27E+07 | 2.24E+07 | 3.1x | 1.8x | 0.6x | |
| Section1:Create:Array:Long:2 | 6.60E+06 | 1.07E+07 | 1.72E+07 | 2.6x | 1.6x | 0.6x | |
| Section1:Create:Array:Long:4 | 4.87E+06 | 7.72E+06 | 1.14E+07 | 2.3x | 1.5x | 0.6x | |
| Section1:Create:Array:Long:8 | 3.73E+06 | 5.62E+06 | 6.89E+06 | 1.8x | 1.2x | 0.7x | |
| Section1:Create:Array:Long:16 | 2.41E+06 | 3.87E+06 | 3.83E+06 | 1.6x | 1.0x | 0.6x | |
| Section1:Create:Array:Long:32 | 1.31E+06 | 2.07E+06 | 2.03E+06 | 1.5x | 1.0x | 0.6x | |
| Section1:Create:Array:Long:64 | 6.72E+05 | 1.23E+06 | 1.12E+06 | 1.7x | 0.9x | 0.5x | |
| Section1:Create:Array:Long:128 | 3.47E+05 | 6.83E+05 | 5.82E+05 | 1.7x | 0.9x | 0.5x | |
| Section1:Create:Array:Object:1 | 8.68E+06 | 1.74E+07 | 3.05E+07 | 3.5x | 1.7x | 0.5x | |
| Section1:Create:Array:Object:2 | 7.42E+06 | 1.28E+07 | 2.23E+07 | 3.0x | 1.7x | 0.6x | |
| Section1:Create:Array:Object:4 | 6.38E+06 | 1.07E+07 | 1.72E+07 | 2.7x | 1.6x | 0.6x | |
| Section1:Create:Array:Object:8 | 4.91E+06 | 7.67E+06 | 1.14E+07 | 2.3x | 1.5x | 0.6x | |
| Section1:Create:Array:Object:16 | 3.76E+06 | 5.62E+06 | 6.89E+06 | 1.8x | 1.2x | 0.7x | |
| Section1:Create:Array:Object:32 | 2.40E+06 | 3.86E+06 | 3.83E+06 | 1.6x | 1.0x | 0.6x | |
| Section1:Create:Array:Object:64 | 1.27E+06 | 2.07E+06 | 2.03E+06 | 1.6x | 1.0x | 0.6x | |
| Section1:Create:Array:Object:128 | 6.69E+05 | 1.23E+06 | 1.12E+06 | 1.7x | 0.9x | 0.5x | |
| Section1:Create:Object:Base | 1.01E+07 | 2.62E+07 | 6.68E+07 | 6.6x | 2.6x | 0.4x | |
| Section1:Create:Object:Complex | 6.18E+05 | 1.83E+06 | 2.20E+07 | 35.6x | 12.0x | 0.3x | |
| Section1:Create:Object:Complex:Constructor | 6.18E+05 | 1.81E+06 | 2.20E+07 | 35.6x | 12.2x | 0.3x | |
| Section1:Create:Object:Simple | 6.93E+05 | 1.96E+06 | 6.64E+07 | 95.7x | 33.9x | 0.4x | |
| Section1:Create:Object:Simple:1Field | 6.76E+05 | 2.00E+06 | 3.43E+07 | 50.7x | 17.1x | 0.3x | |
| Section1:Create:Object:Simple:2Field | 6.67E+05 | 2.00E+06 | 3.43E+07 | 51.3x | 17.1x | 0.3x | |
| Section1:Create:Object:Simple:4fField | 6.57E+05 | 1.94E+06 | 2.28E+07 | 34.8x | 11.8x | 0.3x | |
| Section1:Create:Object:Simple:4Field | 6.65E+05 | 1.95E+06 | 2.29E+07 | 34.4x | 11.7x | 0.3x | |
| Section1:Create:Object:Simple:4LField | 6.40E+05 | 1.94E+06 | 2.28E+07 | 35.7x | 11.8x | 0.3x | |
| Section1:Create:Object:Simple:Constructor | 6.85E+05 | 2.05E+06 | 6.64E+07 | 96.9x | 32.4x | 0.3x | |
| Section1:Create:Object:Subclass | 6.85E+05 | 2.06E+06 | 6.62E+07 | 96.6x | 32.2x | 0.3x | |
| Section1:Exception:Method | 5.37E+04 | 1.45E+05 | 2.56E+05 | 4.8x | 1.8x | 0.4x | |
| Section1:Exception:New | 5.59E+04 | 1.54E+05 | 3.47E+05 | 6.2x | 2.3x | 0.4x | |
| Section1:Exception:Throw | 7.56E+05 | 2.14E+06 | 3.38E+09 | 4465.2x | 1575.1x | 0.4x | |
| Section1:Loop:For | 1.95E+08 | 3.29E+08 | 1.81E+08 | 0.9x | 0.5x | 0.6x | |
| Section1:Loop:ReverseFor | 1.30E+08 | 3.28E+08 | 0.0x | 0.0x | 0.4x | ||
| Section1:Loop:While | 1.29E+08 | 2.63E+08 | 0.0x | 0.0x | 0.5x | ||
| Section1:Math:AbsDouble | 1.34E+08 | 2.15E+08 | 9.11E+07 | 0.7x | 0.4x | 0.6x | |
| Section1:Math:AbsFloat | 1.63E+08 | 2.88E+08 | 9.13E+07 | 0.6x | 0.3x | 0.6x | |
| Section1:Math:AbsInt | 5.71E+07 | 1.66E+08 | 9.46E+07 | 1.7x | 0.6x | 0.3x | |
| Section1:Math:AbsLong | 3.40E+07 | 1.11E+08 | 8.49E+07 | 2.5x | 0.8x | 0.3x | |
| Section1:Math:AcosDouble | 1.12E+06 | 2.90E+06 | 1.14E+06 | 1.0x | 0.4x | 0.4x | |
| Section1:Math:AsinDouble | 3.04E+06 | 8.87E+06 | 2.44E+06 | 0.8x | 0.3x | 0.3x | |
| Section1:Math:Atan2Double | 2.98E+06 | 8.31E+06 | 1.03E+07 | 3.5x | 1.2x | 0.4x | |
| Section1:Math:AtanDouble | 3.11E+06 | 9.34E+06 | 1.59E+07 | 5.1x | 1.7x | 0.3x | |
| Section1:Math:CeilDouble | 4.13E+06 | 1.21E+07 | 1.49E+07 | 3.6x | 1.2x | 0.3x | |
| Section1:Math:CosDouble | 3.63E+06 | 6.85E+06 | 4.91E+06 | 1.4x | 0.7x | 0.5x | |
| Section1:Math:ExpDouble | 2.01E+06 | 4.93E+06 | 4.48E+06 | 2.2x | 0.9x | 0.4x | |
| Section1:Math:FloorDouble | 4.07E+06 | 1.22E+07 | 1.49E+07 | 3.7x | 1.2x | 0.3x | |
| Section1:Math:IEEERemainderDouble | 2.95E+06 | 8.07E+06 | 1.61E+06 | 0.5x | 0.2x | 0.4x | |
| Section1:Math:LogDouble | 1.94E+06 | 4.90E+06 | 3.85E+06 | 2.0x | 0.8x | 0.4x | |
| Section1:Math:MaxDouble | 1.21E+07 | 3.51E+07 | 8.18E+07 | 6.8x | 2.3x | 0.3x | |
| Section1:Math:MaxFloat | 1.27E+07 | 4.02E+07 | 7.96E+07 | 6.3x | 2.0x | 0.3x | |
| Section1:Math:MaxInt | 4.16E+07 | 1.11E+08 | 9.06E+07 | 2.2x | 0.8x | 0.4x | |
| Section1:Math:MaxLong | 1.90E+07 | 6.02E+07 | 6.64E+07 | 3.5x | 1.1x | 0.3x | |
| Section1:Math:MinDouble | 1.20E+07 | 3.51E+07 | 8.48E+07 | 7.0x | 2.4x | 0.3x | |
| Section1:Math:MinFloat | 1.27E+07 | 4.03E+07 | 7.95E+07 | 6.3x | 2.0x | 0.3x | |
| Section1:Math:MinInt | 4.16E+07 | 1.11E+08 | 8.89E+07 | 2.1x | 0.8x | 0.4x | |
| Section1:Math:MinLong | 1.92E+07 | 6.02E+07 | 6.62E+07 | 3.4x | 1.1x | 0.3x | |
| Section1:Math:PowDouble | 7.09E+05 | 1.67E+06 | 4.63E+06 | 6.5x | 2.8x | 0.4x | |
| Section1:Math:Random | 8.72E+05 | 2.51E+06 | 9.87E+06 | 11.3x | 3.9x | 0.3x | |
| Section1:Math:RintDouble | 4.15E+06 | 1.19E+07 | 1.52E+07 | 3.7x | 1.3x | 0.3x | |
| Section1:Math:RoundDouble | 1.68E+06 | 3.95E+06 | 8.08E+06 | 4.8x | 2.0x | 0.4x | |
| Section1:Math:RoundFloat | 2.86E+06 | 7.43E+06 | 1.27E+07 | 4.4x | 1.7x | 0.4x | |
| Section1:Math:SinDouble | 4.69E+06 | 9.06E+06 | 5.34E+06 | 1.1x | 0.6x | 0.5x | |
| Section1:Math:SqrtDouble | 3.30E+06 | 7.30E+06 | 1.60E+08 | 48.5x | 21.9x | 0.5x | |
| Section1:Math:TanDouble | 2.14E+06 | 5.34E+06 | 3.43E+06 | 1.6x | 0.6x | 0.4x | |
| Section1:Method:Other:Class | 6.05E+07 | 1.70E+08 | 9.30E+07 | 1.5x | 0.5x | 0.4x | |
| Section1:Method:Other:Instance | 4.02E+07 | 1.05E+08 | 1.47E+09 | 36.5x | 13.9x | 0.4x | |
| Section1:Method:Other:InstanceOfAbstract | 3.94E+07 | 1.05E+08 | 3.17E+09 | 80.6x | 30.3x | 0.4x | |
| Section1:Method:Same:Class | 6.10E+07 | 1.76E+08 | 9.25E+07 | 1.5x | 0.5x | 0.3x | |
| Section1:Method:Same:FinalInstance | 6.10E+07 | 1.76E+08 | 9.15E+07 | 1.5x | 0.5x | 0.3x | |
| Section1:Method:Same:Instance | 6.39E+07 | 1.87E+08 | 9.10E+08 | 14.3x | 4.9x | 0.3x | |
| Section1:Method:Same:SynchronizedClass | 9.08E+06 | 1.98E+07 | 4.98E+07 | 5.5x | 2.5x | 0.5x | |
| Section1:Method:Same:SynchronizedInstance | 8.84E+06 | 1.95E+07 | 4.77E+07 | 5.4x | 2.4x | 0.5x | |
| Section1:Serial:Reading:Array | 1.59E+04 | 1.41E+05 | 5.81E+05 | 36.6x | 4.1x | 0.1x | |
| Section1:Serial:Reading:Binarytree | 1.37E+04 | 1.17E+05 | 4.49E+05 | 32.8x | 3.8x | 0.1x | |
| Section1:Serial:Reading:Linklist | 4.16E+04 | 1.50E+05 | 5.38E+05 | 12.9x | 3.6x | 0.3x | |
| Section1:Serial:Reading:Vector | 1.12E+04 | 1.24E+05 | 5.07E+05 | 45.4x | 4.1x | 0.1x | |
| Section1:Serial:Writing:Array | 2.41E+04 | 1.94E+05 | 3.88E+05 | 16.1x | 2.0x | 0.1x | |
| Section1:Serial:Writing:Binarytree | 1.73E+04 | 2.16E+05 | 3.61E+05 | 20.9x | 1.7x | 0.1x | |
| Section1:Serial:Writing:Linklist | 5.82E+04 | 1.89E+05 | 3.73E+05 | 6.4x | 2.0x | 0.3x | |
| Section1:Serial:Writing:Vector | 2.27E+04 | 2.17E+05 | 3.72E+05 | 16.4x | 1.7x | 0.1x |