From: | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
Newsgroups: | comp.compilers |
Date: | 14 May 2005 12:13:38 -0400 |
Organization: | Institut fuer Computersprachen, Technische Universitaet Wien |
References: | 05-05-063 |
Keywords: | arithmetic, performance |
Posted-Date: | 14 May 2005 12:13:38 EDT |
"Jonathan Epstein" <Jonathan_Epstein@nih.gov> writes:
>To effectively solve a research problem, I need a very fast
>(sub-microsecond, if possible) method to determine whether one 96-bit
>integer is an exact multiple of another 96-bit integer.
...
>(2) Which gcc options will ensure that the Athlon64 is really using its
>native 64-bit hardware?
This is the default if you run a x86-64 gcc; an ordinary 386 gcc does
not produce x86-64 code (unless it was configured as a cross
compiler). To run the x86-64 code, you need at least a 64-bit kernel
and probably also 64-bit libraries. So I would recommend installing
an AMD64 distribution of Linux.
One thing of interest to you would be the 128-bit integer type
available on gcc for some targets (last time I tried it, it was
available for x86-64, but not for ppc64). You have to actually define
it yourself like this:
typedef int int128_t __attribute__((__mode__(TI)));
typedef unsigned int uint128_t __attribute__((__mode__(TI)));
Note also that this feature does not work correctly on all gcc
versions, so better test it before relying on it.\
Similarly, for the 64-bit features of the G5 you need an OS capable of
running 64-bit binaries, i.e., either MacOS X 10.4 or Linux-ppc64
(Gentoo, Yellowdog, and an unofficial Debian port support this
architecture).
>What if I were willing to settle for a 96-bit dividend and a 64-bit
>divisor?
That would really fly on the x64-64 architecture, which has a native
128-by-64-bit division (PPC64 only has 64-by-64-bit).
- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/home.html
[I'd suggest an AMD64 version of FreeBSD but otherwise I concur with
the x86-64 suggestions. They're quite cost effective; I bought an
AMD64 motherboard, 2GHz CPU, and 1.5GB of ECC RAM for $442 last
month. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.