[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug in LuaJIT
- From: Peter Cawley <lua@...>
- Date: Tue, 29 Dec 2009 22:51:42 +0000
On Tue, Dec 29, 2009 at 10:48 PM, Javier Guerra <firstname.lastname@example.org> wrote:
> On Tue, Dec 29, 2009 at 5:39 PM, Venkat Murty <email@example.com> wrote:
>> /** The attached code prints out 202 lines with standard lua.
>> And 103 lines with LuaJIT. (LuaJIT-2.0.0-beta2)
> from the Lua manual definition of lua_sethook():
> The count hook: is called after the interpreter executes every count
> instructions. (This event only happens while Lua is executing a Lua
> obviously, this is subject to the exact number of VM instructions. a
> different compiler generates a different number of VM instructions.
> even more, LuaJIT uses a different VM bytecode than plain Lua, so you
> can't compare the number of instructions.
I initially thought the same, but the code only uses the hook to
periodically yield a coroutine, which shouldn't have any effect on the
number of lines of output.