[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: On lua5 and embedding
- From: "C.S. Brooks" <chrisb@...>
- Date: Thu, 30 Jan 2003 14:43:13 -0700
As a professional game developer, here's my 2 cents:
We're using Lua 5 extensively in a computer game here, and it really doesn't
seem to be having a negative impact on performance at all. The speed seems
more than adequate for the task of game programming, especially since the
C/C++ part of your code should really be doing the "heavy lifting" anyway.
The functionality added by coroutines more than makes up for any slight
performance cost. The real issue when you use a scripting language is saving
development time, not increasing performance, anyway. The parts of the code
we have written in lua are simply *not* where most of the cpu cycles are
spent in our game. (And we're writing *all* game-specific code in Lua.) And
coroutines have made the code fit the problem set so much better, and the
resulting code much shorter.
The only performance issue I think we might've run into is garbage
collection, and we were able to work around that by pooling the Lua objects
we were creating. (And that was so quick to code, I haven't really had time
to go back and verify that the gc was, in fact, the problem there.)
I feel like I've been reading an unusual amount of complaining by users on
the list lately, which I don't think is justified. Lua is, by any measure,
an incredible piece of work, and has saved us a *ton* of time on this
project, without a doubt, and made the development a lot more fun, to boot.
And if anyone is really unhappy, I'm sure you can get a full refund. ;)
Anyway, keep up the good work!
Professor Fog's Workshop
----- Original Message -----
From: "Roberto Ierusalimschy" <email@example.com>
> This is one point I do not argue (although, as the tests sugest, this
> difference is quite smaller when the function does anything). But this
> slowdown is a consequence of coroutines, not of metatables. If someone
> argues that we shold remove coroutines from the language so it would run
> faster, then we have a very different scenario.
> -- Roberto