Re: [GD-General] Scripting Systems
Brought to you by:
vexxed72
|
From: Eero P. <epa...@ko...> - 2004-01-22 07:45:55
|
Alen Ladavac wrote: > > >>Lua is fast. It's small. It's trivial to embed. > > > > Do you think that GC is main speed problem? How about name lookups? Does > that show on your profile? > 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. Profilers show the Lua name lookup as a spike in the curves, this might be partially because the VC++ generated code seems to just hit some kind of cache line/branch prediction limitation at least on Athlon, when compiling the Lua hashing function. I suspect that I see the name lookup, not so much as plain variable lookup, but because it is used when fetching array elements by name. Local variables them self AFAIK do not need the name lookup. The main CPU consumption spike still exists in the Lua virtual machine, executing the "byte code" interpreter seems to be quite unlucky exercise for the branch prediction logic in the CPU, and mispredicted branches hurt a lot on P4/Athlon. Eero |