Left here for archival purposes.

User avatar
By TerryE
#16085
netcrusher88 wrote:I suspect auto-typecast is expensive.

?? What do you mean by this? I suspect the difference in CPU time is <1μS either way. Invariably when coding in Lua for the ESP8266, two main factors inform my coding:
  1. I am very limited in RAM so I want my code to have as little runtime footprint as possible, and leave no unintended data in scope after GC
  2. I am limited in FlashFS so I want to keep my code short
BTW, this second point doesn't stop me commenting my code; I just run anything that I download to my ESP-xx through LuaSrcDiet first, and then node.compile() the modules that are called frequently.