Subject: Re: 32-bit packages
To: None <sigsegv@rambler.ru>
From: Eduardo Horvath <eeh@NetBSD.org>
List: port-sparc64
Date: 01/08/2005 15:42:46
On Sat, Jan 08, 2005 at 11:52:12AM +0000, sigsegv@rambler.ru wrote:
> matthew green wrote:
> >   
> >   Just out of interest, is there a performance penalty on NetBSD when 
> >   executing 32-bit binaries with 64-bit kernel, as opposed to native 
> >   64-bit binaries? What about Solaris, does it use the same principles 
> >   when executing 32-bit binaries?
> >
> >
> >every application is different.  if you care about performance you
> >need to actually measure 32 vs 64 bit.  depending on the application
> >either one can be a clear winner, or perhaps it makes no difference.
> >
> 
> Sure, but I was thinking if you're running 64-bit kernel and execute 
> 32-bit binary, does the OS need to use various emulation layers which 
> affect the performance?

YMMV.  The emulation layer will translate 32-bit syscall params to 64-bit
params, and the 32-bit compiler will not use ultrasparc scheduling or
more efficient V9 instructions unless you explicitly tell it you are
running on an ultrasparc, and I don't think you'll get the VIS bzero
and bcopy, but there will be a smaller cache footprint.  So you really
need to benchmark your particular application.

(BTW, the sparc compiler should really be configured to use ultrasparc
scheduling by default.  Processors that can make use of the increased
parallelism should run faster, and those that can't shouldn't notice
any difference (except in pathalogical instances where speculative
operations were scheduled in parallel with the main code path).)

Eduardo