[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: Fri, 13 Nov 2009 20:23:44 +0100
Norbert Kiesel wrote:
> So running show.lua before default.lua is a bit faster for me than the
> other way around, but all are in the same ballpark (+- 3% or so)
Apparently it can only be triggered with a 32 bit Lua. And my
patch seems to solve the problem.
Maybe there's a less expensive place to put the GC check, though.
None of the parsed strings are collected, so it's really only
necessary to get the GC out of the sweepstring state. But the
reader function could interfere, so it's probably better to add
the check in luaX_newstring() as originally proposed.
BTW: I found another problem: luaX_setinput() calls next() which
in turn may call the reader function which in turn may run the GC.
But the chunkname string is still unanchored. It's only anchored
when open_func runs and anchors the prototype in the stack.
It looks like this can't trigger right now, because of the
lookahead check for the bytecode signature in f_parser. But it's a
potential GC bug, if that behavior ever changes.
--Mike
- References:
- Re: The Lua interpreter and large scripts, Mike Pall
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, Mike Pall
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, KHMan
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, Luiz Henrique de Figueiredo
- Re: The Lua interpreter and large scripts, Sean Conner
- Re: The Lua interpreter and large scripts, Norbert Kiesel
- Re: The Lua interpreter and large scripts, Norbert Kiesel