TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

Speed Up The LUA Interpreter #2631

Open LeeBamberTGC opened 2 years ago

LeeBamberTGC commented 2 years ago

NOTES From Rick:

Built to speed up and help ROBLOX devs. Can be used under MIT licence.

Luau - Luau (luau-lang.org)

Also found this; SciLua

And some stackoverflow comments;

optimization - What can I do to increase the performance of a Lua program? - Stack Overflow

Necrym59 commented 2 years ago

Apart from some of those options in GameGuru everything is run in a time-critical environment, i mentioned somthing in a previous post , https://github.com/TheGameCreators/GameGuruRepo/issues/2542 about using a global lua repositry section with timers to optimise useage. Specific object scripts dont run all the time usually so they take pretty much care of themselves to a great degree. I think the days of the barrels are numbered.

3coms commented 2 years ago

This might help a lot, though.

https://en.wikipedia.org/wiki/Memoization

Necrym59 commented 2 years ago

Memoization is a great idea but requires a centralised global functionbank wouldnt it, then were getting into the realms of distributed reuseable code. Ok by me and you perhaps, possibly a bit much for the average Max user to come to grips with especially if Max is designed to make it easier, perhaps it could be done at some point it would make scripting a lot easier and more plug and play and im sure Amen would simply love to supply the function banks :).

LeeBamberTGC commented 2 years ago

@Necrym59 Already do a little "Memoization" when recalculating rays (as the static scene does not really change much) )