How much better are 64 but platforms
Terry Lambert
tlambert2 at mindspring.com
Thu Oct 30 04:02:54 PST 2003
Bill Moran wrote:
> I mean, if you just took FreeBSD (for example) by
> itself and moved it from 32 - 64 bit, how much faster is it (assuming the same
> mhz processor, if possible). How about PostgreSQL (which is the database
> server we're using).
If your application is swap/mmory bound, then putting it on a 64 bit
box and installing a grundle of RAM would make it faster (grundle>4G).
> In general, how much faster is C compiled on a 64 bit platform?
Slower. Half as much data transferred per cycle for things that
used to be 32 bit but are now 64 bit (think instruction/data prefetch).
> Basically, all
> this app does is pull a crapload of database records into RAM, do a whole bunch
> of string comparisons, generate some percentages, and write significant results
> back to another database table. Should I expect 64 bit to be a big improvement?
String compares could be made significantly faster for runs of 8
or more bytes. See the copin/copyout/bcopy/etc. code for examples
of doing things in as-large-chunks-as-you-can-at-a-time.
Note that use of 64 bit registers on 32 bit machines means dirtying
FPU registers, which makes context switches slower; using 64 bit
registers for this instead saves on context switch overhead.
You will likely need to hand-code and hand-optimize routines to take
advantagoe of this. On Itanium, this will be rather difficult to
get your head around, because the CPU is so strange.
Also, I'll repeat what someone else said: use an AMD64 instead of
an Itanium: the compiler generates better code.
-- Terry
More information about the freebsd-chat
mailing list