[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The Lua interpreter and large scripts
- From: Mike Pall <mikelu-0911@...>
- Date: Wed, 11 Nov 2009 08:48:23 +0100
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