Re: Scripting Systems

Eero Pajarre <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
Alen Ladavac wrote:

> From: "Eero Pajarre" <[email protected]>
> 
>>For me GC has not been the main problem speed wise, and I do trigger
>>GC each frame, so that I can minimize "real time" problems with it.
> 
> 
> Interesting idea. It really must smooth the performance. Though I would
> expect it to be slooow. It certainly does trash the cache big time, doesn't
> it?
> 

It might be just me not noticing it, but as I said it has not
been a problem yet. I certainly have been "garbage aware" in my
code, so I don't produce that much of it. Also my data structures
at lua side are not that huge. The main objects are on C++ side
and just referred from the Lua side, although I typically
still have also a Lua table for each main object.

> 
>>Profilers show the Lua name lookup as a spike in the curves, this might
> 
> That's same thing that I heard before, and one of main reasons why we didn't
> choose Lua for in-game scripting. I just couldn't find anyone who could
> reaffirm that.
> 
> 
>>Local variables them self AFAIK do not need the name
>>lookup.
> 
> That is good. However, any member variable/function access would do a name
> lookup, right?
> 

Yes, although the access is based on hashed arrays etc, and is
quick.

> 
> Out of curiosity, does the interpreter have a function table for
> instructions? If yes, then I don't see how so much misprediction could
> happen. :/
> 

The main loop is actually switch based, but I think that even
with function table the main switching point would predict
rather badly. Also there is some unpacking of parameters in
the virtual machine, which also doesn't branch predict too well.


		Eero




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.