[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why can't I do for...in on a table?
- From: Wim Couwenberg <wcou@...>
- Date: Mon, 12 Sep 2005 09:42:58 +0200
Also, it seems like it would be more efficient to use a table directly
for a couple of reasons. First, the special code that must have been
in place to handle a table directly would be faster than having to
make a function call every time.
Lua 4 didn't reenter the VM at least. I suppose that was a bit faster.
Sorry, 5.0 (and 5.1) doesn't either since "next" is a C function. I
guess the luaD_call will still have some overhead compared to calling
luaH_next directly but I'm not sure how much.