Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Advantages of 64-bit vs 32-bit on old hardware



On Wed, 12 Mar 2008, raymond.meyer%rambler.ru@localhost wrote:

> I actually think that 64-bit binaries run slower on this platform. Ultra 10 
> has slow main memory, 50ns compared to modern DDR RAM, so the more 
> instructions that can fit into faster cache memory, the faster they will 
> execute. In fact smaller executables run faster, I build everything (kernel, 
> userland, pkgsrc programs, etc) with 'gcc -Os -mcpu=ultrasparc -mvis'

Have you benchmarked?  Last time I measured it v9 binaries ran 10-20% 
faster than v8 binaries.  

Code to load 64-bit constants into registers take 3 more instructions
than 32-bit constants, but being a dual issue machine makes up for most
of that, and pointers take up more space in the D$, but the performance
degradation from those is usually too small to measure, especially 
compared to the gains from the v9 instructions.  

Oh, and -Os is probably a bad idea if you want performance compared to
say -O2.  Layout of instructions in the I$ is important for efficient
instruction issue on USI and USII cpus.  Ideally you want 2 integer ops
followed by 1 load/store and 1 branch or FP op to get optimal performance.
Breaking this group across cache lines will require an extra cycle.  And
being a superscalar, speculation is good for performance but bad for
code size.  I don't think you're making the right tradeoff here.

Eduardo


Home | Main Index | Thread Index | Old Index