lua-users home
lua-l archive

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


* Cauê Waneck:

> I've been looking at the LuaJIT optimizations ( at
> http://article.gmane.org/gmane.comp.lang.lua.general/58908 ), and there is
> one that really caught my attention - Hash slot specialization. How is it
> made? Are there any references to look for? It seems to dynamically bind a
> constant property access to an array value - but how does it do that?

The index "17" in the example is not in the array part of the table.
It's in the hash part, and "17" is just the expected bucket number.
If the guess is wrong, HREFK will hit the slow path (via "got exit").