lua-users home
lua-l archive

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


> ¿Have you taken any time measurements?
> I don't know about you, but in my experience, having thousands of
> scripts running simultaneously doing anything non-trivial is very
> demanding for the CPU.
> Also, saying that you will also be spawning new scripts doesn't help
> things, because some time will be spent parsing them.

No problem, we'll have a very good dedicated server for that. It's not for
end-users. Also, spawning new scripts doesn't always mean I have to parse
them, as I can cache them.

> In my preliminary tests, I found lua to be about ten times slower than
> equivalent C++ code (which BTW is very good performance). But I don't
> plan on having thousands of characters running simultaneously: if I did,
> I would probably want that 10x performance back.

Yeah, pretty good performance. I'm more concerned about the yield()/resume()
overhead than with general scripts performance.

> Make sure that you can afford so many NPCs before you decide on the
> specific way to divide the work in threads.

Thanks for your concern, but I would be happier if anyone could answer my
question :)

Thanks again,
Thiago Bastos