[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Intel C/C++ free compilers
- From: Paul Hsieh <qed@...>
- Date: Mon, 10 Mar 2003 03:17:45 -0800
> >I tried it with Lua 4, and it made quite a large difference, esp. if you
> >used the dodgy switches to speed floating point operations.
>
> With gcc, try compiling Lua 5.0 (beta) using these switches:
>
> -D'lua_number2int(i,d)=__asm__("fldl %1\nfistpl %0":"=m"(i):"m"(d))'
The above will perform non-ANSI compliant double -> int rounding. As I recall,
negative numbers will not round to the same number as ordinary casting (one rounds
towards zero, and the other just rounds downward, as I recall.)
--
Paul Hsieh
qed@pobox.com