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 Wednesday 12 March 2008 15:41:42 Eduardo Horvath wrote:
> 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

Yes I have benchmarked, not very extensively, but I compiled various programs 
with gcc -O3, -O2 and -Os flags, -Os gave the smallest executables and they 
ran just a little bit faster. I think if you compile everything with -Os, 
then the overall memory usage will be lower, in general giving better 
performance for desktop applications like gnome and kde. Since more 
instructions will be able to fit in cache memory.

Home | Main Index | Thread Index | Old Index