lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alex Queiroz wrote:
[...]
> On 4/17/06, David Given <dg@cowlark.com> wrote:
>> Does the naive approach (simply defining the macro to 'i=(int)d') work
>> effectively?
[...]
>      It works, it's just slow to a crawl.

Why? Not that I'm arguing, I'm just curious to know why such a primitive
operation is so slow. If the eight or so instructions that gcc generates
to do this (I just checked) can be replaced with the two FPU
instructions described earlier, or a cunning integer arithmetic hack,
then why doesn't gcc do this by default?

- --
+- David Given --McQ-+
|  dg@cowlark.com    | "Those that repeat truisms, are also forced to
| (dg@tao-group.com) | repeat them." --- Anonymous from Slashdot
+- www.cowlark.com --+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFERLuff9E0noFvlzgRAhlMAKC49i9EN+8BshR+MrNSBHo8Z37emwCgvQjE
UFRFBriGHvijnKqOKC3IhtU=
=3yAl
-----END PGP SIGNATURE-----