Skip to content

LUA_EnumLib optimizations for constant value access

Hannu Hanhi requested to merge Hannu_Hanhi/SRB2:lua-optimized-constants into next
  • Constants are stored into _G after first use
  • Made LUA_EvalMath's dedicated Lua state permanent so it can also benefit from these optimizations
  • Tests show that time spent in game logic code improves by 10-20% when mods are loaded and player is idling on a map

Test build: (updated 2022-01-25) (based on next so be careful with your save files)

srb2win_lua-optimized-constants-2.exe

Edited by Hannu Hanhi

Merge request reports