lua-users home
lua-l archive

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


Sean Conner wrote:
>   Third example was running the Lua interpreter with the "-i" option loading
> up show.lua, then typing
> 	dofile("default.lua")
> 
>   It was the third example that took six minutes.

The "-i" option loads readline which as a side-effect initializes
the NLS locale for the current process from the environment
variables.

This may slow down all conversions of strings to numbers, numbers
to strings and string comparisons. Looks like it's 30x slower in
your case.

Try os.setlocale("C") before the dofile().

--Mike