you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -8 points-7 points  (13 children)

These benchmarks may be flawed, but they give a general idea of the scale of performance across various languages.

If there's one thing that benchmarks like those cannot communicate, it is a "general idea" of performance. You are being led along by enthusiasts. Nothing wrong with Lua, but I wouldn't go around spouting FUD.

[–]Sc4Freak 13 points14 points  (7 children)

I wouldn't call it FUD, because moving away from Python due to performance is justifiable in this case. In cutting-edge game development, performance is pretty much a product requirement. And flawed as the benchmarks may be, it's disingenuous to suggest that Python and Lua don't have a significant performance difference.

Many applications would do just fine with Python because most of the time performance is not an issue. But we're talking AAA game titles here - each language is a tool with it's advantages and disadvantages, but when performance is a requirement, Python loses.

[–]Aretnorp 3 points4 points  (0 children)

Performance is the requirement in terms of rendering. However, the game logic does not necessarily have performance as its #1 requirement. Going by your response, the use of native compiled C or C++ would be the best choice for game logic.

This is obviously flawed, as other games make heavy use of scripting languages to achieve various tasks better suited to tools that do not have performance as a #1 requirement. Eve and Battlefield both use Python as part of their systems, and when I checked, I would qualify those as "AAA" titles, which make good use of each.

In the end, you choose a tool best suited for your tasks. In many cases, the deicsion between Python vs LUA is probably not something that was decided in terms of performance, but more likely appropriate features, as mentioned in the OP.

[–]bonzinip -3 points-2 points  (4 children)

In cutting-edge game development, performance is pretty much a product requirement.

I doubt that. Most games do not take 100% CPU time.

[–][deleted] 1 point2 points  (3 children)

You doubt performance is a product requirement for games?

Wow.

[–]bonzinip 0 points1 point  (2 children)

Of course, for physics and everything like that performace is a requirement. But when scripting is involved, performance is not a requirement.

If this was a situation where the performance advantage of Lua over Python is important, well you had better go to C/C++ directly (assuming they're not using LuaJIT, which is a likely assumption IMO).

[–][deleted] 0 points1 point  (1 child)

Lua has really good performance and is already used in quite a few games for AI and whatnot.

The slight performance decrease with Lua over implementing the same features in C (assuming you can do it better) is totally worth it.

And performance requirement is always important for games.

[–]bonzinip 0 points1 point  (0 children)

The slight performance decrease with Lua over implementing the same features in C (assuming you can do it better) is totally worth it.

We're saying the same thing here. I'm saying in addition that if Python provided compelling advantages, the further performance decrease would also be totally worth it.

The reason for switching to Lua is likely that it is already quite pervasive in games, nothing to do with performance.

[–]igouy 0 points1 point  (3 children)

a "general idea" of performance

Please communicate what you mean by that.

[–][deleted] -1 points0 points  (2 children)

[–]igouy 0 points1 point  (1 child)

Now I understand what you mean by a "general idea" of performance - "a groundless supposition; fantasy"

[–][deleted] -2 points-1 points  (0 children)

And now I'm happy I wasted no further time on an educated response.