lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Josh Haberman <jhaberman <at> gmail.com> writes:
> Does it?  I saw this store of my value (5) in the generated code -- I know
> it's my value because when I change in in my Lua program, it changes in
> the disassembly also:
> 
> 1390bffd6  mov dword [rax+0xc], 0x5

Whoops, I just looked again and it appears that while this store does
occur, it's not inside the loop.  So my benchmark was indeed worthless.
I guess I'll try another version of it that performs some calculation inside
the main loop that can't be optimized away.

Any light you can shed on the core issue (whether __index and __newindex
that look up a method can be as efficient as straight method calls) would be
most helpful!

Josh