[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Unprepared Stack Top Increase
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 16 May 2013 09:47:17 -0300
> It's not the cost of the function call so much as the cost of a conditional
> branch. The Lua VM very judicially uses similar tricks elsewhere to minimize
> conditional branching because it's one of the biggest--if not the
> biggest--cost factor with VMs on modern processors.
There is a more relevant cost (if you understand the full contract ;):
a call to luaD_checkstack can reallocate the stack, and therefore
invalidate all pointers to it.
-- Roberto