From: Mok-Kong Shen <mok-kong.shen@t-online.de>
Subject: Re: 64 bit codes
Date: Tue, 27 Sep 2011 15:48:16 +0200
Date: 2011-09-27T15:48:16+02:00 [thread overview]
Message-ID: <j5sk71$s74$1@news.albasani.net> (raw)
In-Reply-To: <e47de46f-b582-47f4-a8de-c95e9eb46e51@fx14g2000vbb.googlegroups.com>
Am 27.09.2011 15:09, schrieb Ludovic Brenta:
> Mok-Kong Shen wrote on comp.lang.ada:
>> I have some computations that would be much more efficient, if done
>> with 64-bit arithmetics ("natively") than with 32-bit arithmetics
>> and I don't like to take the trouble/"risk" of having a 2nd OS on my
>> PC (I don't think currently to possess even the proper knowledge to
>> do that at all).
>
> I'm not sure what you mean exactly by "64-bit arithmetic". If you
> require 64-bit addresses, then yes you need a 64-bit compiler. But if
> you only need 64-bit floating point numbers, the 32-bit compiler can
> provide them just fine. In fact, on Intel hardware, Long_Floats are
> normally 80 bits wide IIRC. Similarly, I think Long_Long_Integer is
> 64 bits wide even with a 32-bit compiler.
On 32-bit gcc, arithmetic operations (+, *, etc.) on "unsigned long
long int" certainly all work, but it's inefficient. Anyway the runtime,
as I have observed in the past, is much higher than I would expect.
For lack of knowledge I have not attempted to see the actual code
generated, but I suppose that's done with the help of some low-level
macros. (By definition, there aren't 64-bit arithmetic instructions on
32-bit hardware.) For on 64-bit hardware a native 64-bit arithmetic
operation shouldn't last very much longer than a corresponding 32-bit
opeartion, I would think.
M. K. Shen
next prev parent reply other threads:[~2011-09-27 13:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 6:59 64 bit codes Mok-Kong Shen
2011-09-27 7:48 ` Georg Bauhaus
2011-09-27 9:04 ` Mok-Kong Shen
2011-09-27 9:14 ` Ludovic Brenta
2011-09-27 9:54 ` Mok-Kong Shen
2011-09-27 10:08 ` Ludovic Brenta
2011-09-27 11:21 ` Mok-Kong Shen
2011-09-27 13:09 ` Ludovic Brenta
2011-09-27 13:25 ` Georg Bauhaus
2011-09-27 13:51 ` Mok-Kong Shen
2011-09-27 14:15 ` Mok-Kong Shen
2011-09-27 14:40 ` Ludovic Brenta
2011-09-27 13:48 ` Mok-Kong Shen [this message]
2011-09-27 14:50 ` Ludovic Brenta
2011-09-27 15:49 ` Bill Findlay
2011-09-28 9:53 ` Georg Bauhaus
2011-09-28 10:36 ` Ludovic Brenta
2011-09-28 0:38 ` Rugxulo
2011-09-29 17:08 ` Rugxulo
2011-09-29 19:20 ` Pascal Obry
2011-09-29 19:26 ` Ludovic Brenta
2011-09-29 19:35 ` Pascal Obry
2011-09-29 19:38 ` Pascal Obry
2011-10-06 2:48 ` mjamesb
2011-09-27 15:39 ` Simon Wright
2011-09-27 19:13 ` Simon Wright
2011-09-28 7:16 ` Georg Bauhaus
2011-09-28 12:26 ` Fritz Wuehler
2011-09-28 13:41 ` Yannick Duchêne (Hibou57)
2011-09-28 14:28 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox