Re: How fast is LuaJIT supposed to be?

11 views
Skip to first unread message

Henning Diedrich

unread,
Jan 21, 2011, 3:39:09 PM1/21/11
to lua-table...@googlegroups.com, Lua mailing list, Axel Kittenberger
On 1/21/11 8:34 PM, Axel Kittenberger wrote:
On Fri, Jan 21, 2011 at 8:10 PM, Alexander Gladysh <agla...@gmail.com> wrote:
On Fri, Jan 21, 2011 at 22:08, Steve Litt <sl...@troubleshooters.com> wrote:
On Friday 21 January 2011 03:48:02 Axel Kittenberger wrote:

Is table lookup really more expensive than passing in as an arg and passing
back as a return? Ugh!
Try LJ2, you will think about these implementation details no longer. :-)
Strange I didnt see that email :-/

Lua Tables are hashtables. Putting and getting stuff from a hashtable
is of course slower than from a local variable (that is either on
stack or even a register)

Possibly a fresh opportunity to optimize the table implementation qua single shot key cache for such cases?

Mostly less visibly and intended, cases like Steve's primearray[...] use could be quite frequent in the wild. Not as misunderstanding, but per program flow. Could it pay off to look at the first-last-found-key first, always?

Henning
Reply all
Reply to author
Forward
0 new messages