lua-users home
lua-l archive

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



On Mar 18, 2007, at 7:06 AM, Daniel Silverstone wrote:

On Sun, 2007-03-18 at 06:51 -0400, Gé Weijers wrote:
Relative to Lua's performance:
C: 31.20   (optimized)
C: 10.90   (unoptimized)
Lua: 1.00
Python: 0.35
Perl: 0.15

Thanks for these numbers, Gé, they're very interesting.

I don't believe they're all that representative. I called it 'unscientific' for that reason. As the benchmarks show on 


the relative performance of languages is severely dependent on the actual benchmark. All that 'nfib' is good for is to show whether the language implementors have done their homework. 


This suggests that if games companies are discarding Lua for being too
slow at function calls, they should consider LuaJIT seriously. LuaJIT is
only really available on x86 platforms, but since the vast majority of
games are intended for those kinds of platforms, I think it's fair to
say it could make a serious difference.

I've written larger chunks of software in Python before. When things got to slow I moved the critical part into a C module.

Lua allows you to do the same, so the speed is not that relevant to me. The Lua side of your program should deal with high-level abstractions most of the time, and leave the bit-twiddling to C routines. This is where good software design comes in.


--
Gé Weijers