lua-users home
lua-l archive

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


Mike Pall wrote:

> If you think this through, you'll have to realize that LNUM is
> entirely pointless on a desktop CPU. Because its basic assumption
> (that integers are somehow faster than FP numbers) is unsound.

Truly this has to be the last word on the current lnum going into the
core. The logic is undeniable for the desktop, where almost all
instances of Lua reside.

Like Asko, I would love to see a "blessed" integer or mixed numeric
distribution option. I would be thrilled to have a single #define for
ANSI C compatible integer+floating point where floating point is avoided
when possible (or even a second #define to avoid it completely). For the
mixed int+float case, the normal Lua test suites should provide some
assurance of its correctness. The biggest problem I see is with dirty
source code. I hate reading through a mass of #if/else/endif. Is there
another way?

I know that I am not alone in my toils to upgrade to new versions of Lua
even in an ANSI C environment when all I want to do is eliminate
floating point. Usually I start with the suggestions that are found in
many places, then tweak it until it works, then I check it all in, happy
to be finished. The next time I go through this process I'll be sure to
submit my own instructions to the list and post it on the wiki.

Thanks for the hard work, Asko. I used an earlier lnum for PowerPC (no
OS), but I did have to make a few mods afterwards.

Doug

-- 
Innovative Concepts, Inc. www.innocon.com 703-893-2007 x220