[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1 (work4) now available
- From: Mike Pall <mikelu-0412@...>
- Date: Fri, 31 Dec 2004 14:46:39 +0100
Hi,
maybe it got lost, but when David suggested the MSC specific variant of
lrint, I pointed out that the proper conditional has to be:
#elif defined(_MSC_VER) && defined(_M_IX86)
... since it is compiler specific (_MSC_VER) and *not* OS specific (_WIN32).
And yes, the cast vs. inline function does make a big difference on i386.
The change to the FPU status word to set the rounding mode flushes the
instruction queue (and it needs to be done twice). This is dead slow.
Since we don't care about a specific rounding mode it is a lot faster to
use an inline function.
Note that this is a non-issue on all other processors including x86_64
(the ABI requires the use of SSE registers, e.g. cvttsd2si %xmm0, %eax).
Bye,
Mike