[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: boolean operators
- From: Sam Roberts <sroberts@...>
- Date: Fri, 22 Sep 2006 16:55:36 -0700
On Friday 22 September 2006 3:58 pm, Mike Pall wrote:
> Note that the main speed disadvantage of functions vs. operators
> (around 5x) in interpreted Lua is due to the call frame setup and
> teardown overhead. One way to speed this up would be to add
> "frameless" C functions which operate in the frame of the caller.
> Especially trivial functions (math.*) would benefit a lot.
For context - why is it that C functions need setup?
Its simpler, I imagine, I don't have to worry about stack balancing, and
I can't damage the stack I was called from in my C functions.
Is it purely to protect lua-land from C, or are there other reasons?