[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Drawing the line between speed and simplicity/elegance
- From: Rena <hyperhacker@...>
- Date: Sat, 9 May 2015 21:15:18 -0400
On Sat, May 9, 2015 at 8:53 PM, Sean Conner <firstname.lastname@example.org> wrote:
> It was thus said that the Great Rena once stated:
>> On Sat, May 9, 2015 at 1:01 PM, Roberto Ierusalimschy
>> <email@example.com> wrote:
>> >> Using the C API will make LuaJIT's performance bottom out. If you're
>> >> worried about performance across VMs, stick to pure Lua.
>> > That is not a valid advice across VMs. C code is much faster than
>> > (non-JIT) Lua code. So, not using the C API will hurt Lua performance.
>> > -- Roberto
>> But Lua also has some overhead with calling into C, doesn't it? So
>> some common operations are faster in pure Lua than in C? I'm sure I've
>> heard that.
> But don't those "common operations" already call into C?
Only if you're referring to the Lua VM being implemented in C, which
isn't the same as calling an external C function (a lua_CFunction).
Sent from my Game Boy.