[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Hash slot specialization
- From: Florian Weimer <fw@...>
- Date: Sun, 23 Jan 2011 16:58:32 +0100
* 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").