Increasing TorqueScript speed by reducing overhead

Scripting questions, discussions, etc
4 posts Page 1 of 1
Duion
Posts: 1335
Joined: Sun Feb 08, 2015 1:51 am
 
  by Duion » Mon May 13, 2019 2:30 pm
There is a resource on Garagegames.com where someone increased the performance of Torquescript: http://www.garagegames.com/community/re ... ew/18045/1

I wanted to ask if this is still relevant, or if it has already been integrated and if not, if anyone has the code, since the link is dead.

Maybe we can end the scripting language debate that way and tell people that it is not so much about the scripting language itself, but how it is handled in the engine, which results in different performance.

Also I could imagine that the performance increase in that resource is not that relevant, since the most performance increase was in the scripts that took longer and no increase in the smaller scripts that took not so long to execute.

When I tested the C# scripting implementation that was supposed to be so much faster I found out that it was only so much faster in an mostly empty scene, but in a full loaded scene it was even slower than Torquescript. However I'm no expert on that, that is why I ask here.
Happenstance
Posts: 88
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Mon May 13, 2019 3:35 pm
People like @jamesu, @
User avatar
Hutch
, and @
User avatar
MangoFusion
made improvements along these lines and most of those changes were rolled in at some point. T3D's version of TorqueScript is noticeably faster at certain things than previous versions as a result. The largest improvement was probably a result of simply disabling the antiquated memory manager TGE/T2D uses (this is off by default in T3D).

One of the issues with that resource is that the seven benchmark tests the author uses aren't particularly realistic. It's rare to call a function a million times in a single loop, and if for some reason you do need to do that doing it in script would be bad design anyway. It'd be more realistic to test function calls over a few thousand iterations but that would likely take less than 1ms to complete and make it difficult to measure the performance differences (if any).
Duion
Posts: 1335
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon May 13, 2019 3:39 pm
So that resource is obsolete?
Happenstance
Posts: 88
Joined: Sat Apr 11, 2015 9:08 pm
by Happenstance » Mon May 13, 2019 4:18 pm
It's hard to say without being able to see the code but it's likely some of his changes are irrelevant at this point.
4 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest