Re: Openssl compilation and gcc options

From: Darren Dunham (ddunham_at_redwood.taos.com)
Date: 10/08/03


Date: Tue, 07 Oct 2003 23:04:22 GMT

Dimitri Maziuk <dima@127.0.0.1> wrote:

> ... Unless it does 64bit math, I can't think of
>> any reason it would be faster, and I can think of reasons it would be
>> slower.

> I haven't looked into Solaris internals/hardware so I don't know
> how they do 32-bit compatibility. Normally I'd expect code in native
> word size to perform better -- with 32 bits, you'd be splitting each
> 64-bit word in two and padding them with zeroes -- but I suspect Sun's
> doing something smarter than that.

Neither instruction set is more native than the other. Both are
executed directly by the processor. So the OS doesn't do any extra
work.

> Aside: I find it hilarious that Sun will use 64-bitness as selling
> point for their hardware, and then tell you "yeah, and we spent so
> much effort on 32-bit compatibility that it now runs 32-bit code
> faster than it runs 64-bit code". Like, huh? Why bother with extra
> 32 bits at all then?

*for the same task* a 64 bit binary is unlikely to offer any significant
speed advantages. However, a 64 bit binary can accomplish tasks that a
32 bit binary cannot (access more than 4GB of VM, access kernel space on
a 64-bit kernel, ...). For the big ticket guys (multi-gigabyte
databases), this is a big deal.

There is the possibility of using "denser" CPU instructions (that do
more work per instruction), but I don't know if current compilers make
extensive use of them yet.

The only real disadvantage (CPU wise) I'm aware of is that pointers in
the code are larger. So a tight loop with 32bit pointers may fit
entirely in CPU cache that would overflow when it used 64bit pointers.
For pathological cases, this could create significant speed differences.

I doubt OpenSSH has anything in the code that would make a 64bit copy
have any advantages. You're certainly welcome to create it.

It's just when the 32 bit copy is pretty much the same and runs on more
machines, most admins won't bother to create and maintain a separate 64
bit copy.

-- 
Darren Dunham                                           ddunham@taos.com
Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >


Relevant Pages

  • Re: How to name variables in a program?
    ... Phlip wrote: ... >> this convention works with prefixes to indicate variable type. ... > This minor editor feature is a major reason all the early MS code used HN. ... > pointers, ...
    (comp.programming)
  • Re: primitives vs cleverness vs readability
    ... There's no reason at all to use 64-bit threading on a 64-bit ... this isn't something gcc maintainers have any control over. ... The claim was that ITC doubles size from 32-bit to 64-bit processors. ... Maybe a simple jump indirect instruction is used, ...
    (comp.lang.forth)
  • Re: Natural language programming?
    ... All types of events are created by the cpu which is both creating all ... it means that violence is never far away. ... That is the reason why he likes to play chess with his male friends, ...
    (comp.programming)
  • Re: Non-intel benchmarks on Conroe vs AMDs AM2 FX62
    ... Are you advocating waiting, for some future "shake-out" or price ... new and promising CPU? ... much better reason to wait than are future price reductions. ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: [PATCH RFC 3/9] RCU: Preemptible RCU
    ... rather than one per CPU. ... > .completed increment in this code. ... But that is not the only reason for the cli... ... because I need the pointer before I can lock it. ...
    (Linux-Kernel)