MOARdV / AvionicsSystems

MOARdV's Avionics Systems for Kerbal Space Program - a new generation of IVA enhancement.
Other
52 stars 26 forks source link

Improve Lua std lib optimizations #194

Closed MOARdV closed 6 years ago

MOARdV commented 6 years ago

Since I've added code to create lambda wrappers directly for Lua table.function evaluation (used by the Lua standard libraries), I should go one step farther and add evaluate which functions would classify as dependent variables (output is determined solely by input). I imagine the string and math libraries are mostly, if not entirely, dependent. Treating them as such will reduce the amount of Lua overhead for simple cases, like

  activeText = <=0=>$&$ string.upper(fc.TargetVesselName(%ITEMID%))

in the ASET_CRT_Display vessel target menu.