- Thu Apr 30, 2015 6:05 am
#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:
- 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
- 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.
Please see my
Developer FAQ for Q&A on nodeMCU Lua before asking a question here that's already been answered. This and the other official documentation should be your first reference for developing Lua Apps