lua-users home
lua-l archive

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




On 05/01/2015 12:43, Lorenzo Donati wrote:

On 05/01/2015 12:21, Lorenzo Donati wrote:


On 05/01/2015 12:11, Roberto Ierusalimschy wrote:
Does the introduction of integers slow the interpreter so much (it
is the only architectural change I know of that could possibly
affect so much the tests)? Since I got some compilation warnings
(see another subthread) I tried to recompile with different TDM-GCC
versions, but to no avail: lua 5.3 is a crawl compared to the
previous versions.

The use of 64-bit integers in 32-bit architectures may slow down the
interpreter a little bit, for some programs, but nothing close to what
you are relating.  A difference from a couple of seconds to 3 minutes
is completely unexpected. (In my machine, the worst cases are in the
order of 10~20%, with several programs being not affected or running
even faster.)


Yep, as I said, that was what I expected to pay to have my cake (64bit
int/float Lua) and eat it too (32bit executables). It is a very
reasonable tradeoff. I'll try to apply Luiz' and Philipp Janda's
suggestion and will report back.

-- Roberto




Ok, tested with

#define LUA_C89_NUMBERS

as the first luaconf.h line.

No changes, still a crawl. I verified it actually had 32bit integers by
typing:

("%.16x"):format(~1)

in the interactive interpreter getting 00000000fffffffe instead of
fffffffffffffffe.

I'll try to check if it is a GC issue, as hinted by Philipp.

-- Lorenzo


BTW, just to be sure it is not some Windows-C99 support issue, I also compiled with the LUA_USE_C89 macro, but same results.