lua-users home
lua-l archive

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



Am 17.07.2013 19:28 schrieb "Tim Mensch" <tim-lua-l@bitgems.com>:
>
> On 7/17/2013 8:25 AM, Steve Litt wrote:
> > So true Tim. And besides that, if you're not doing a random number
> > generator or a hugely graphics heavy program, is runtime speed
> > really that important?
>
> I do games. I have to do ALL of my upkeep, graphics set-up, AI calculations, etc., in 16.66ms or less, or it's going to skip a frame.
>
> Yes, speed is still important. ;P

Yes.

>
> The rest of your points are good, of course, which is why I'm using LuaJIT instead of writing most of the code in C++.
>

Yes.

> The only way things would be better for me (and games in general) is if LuaJIT had an optional reference-counted garbage collector.

A thousand times: YES!
I also would like to have reference counting to avoid GC creation. It would enable us to use the function call by table semantic without the dreadful implication of producing tons of garbage. What I mean is that something like "f{x=1}" is well readable but simply too inefficient in many applications. In a reference counting garbage collection, I'd assume that such temporary tables would get eliminated really quickly without burdening the mark &sweep collector...

> and the slight decrease in amortized performance would be more than offset (for needs of games) by the decreased memory required compared to mark-and-sweep and the increase in predictability of execution times.
>

Predictability would certainly be worth it - for me at least as well.

> Tim
>
> [1] http://luaplus.org/#What-is-LuaPlus -- tl;dr: "An optional high performance reference counted garbage collector."