lua-users home
lua-l archive

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


> I'm not really skilled enough to attempt more than a few approaches - those
> listed - and I'm not really sure I'm up to the task of creating effective
> benchmarks.  Basically, I (and others, apparently) am simply curious to know
> if anyone has checked to see exactly what impact this flag creates vs.
> changing the Lua number to float, etc.  From what I've heard everyone has
> simply adopted the flag, and damn the cost.

Do not forget these two approaches:

1) change lua_number2int in luaconf.h to this:

  #define lua_number2int(i,d)   __asm fld d   __asm fistp i

(Should have no performance penalty, but only works on selected compilers.)


2) change lua_number2int in luaconf.h to its default definition:

  #define lua_number2int(i,d)     ((i)=(int)(d))

(Should always work, but may have a performance penalty in Lua; but
how much??)

-- Roberto