First off, I want to say how great I think the Corona SDK is. It's an awesome, awesome tool, and the best $99 I've spent in a long time. I'm working on a game with it, and I had a few questions.
I come from an ActionScript 2/3 background, so it's been very easy to learn Lua. But, I have some efficiency questions that I'm sure a lot of people here know inside and out. These questions might also have to do with how Corona compiles the Lua code.
1. Variable names - does the length of variable names effect efficiency at all? I would assume no since all names are probably dropped at compilation, but I just want to make sure.
2. # of items in table - when you do #mytable, is it doing this calculation each time or is this a property that is stored somewhere? If it's done each time, it makes sense for situations like loops to store it beforehand in a variable, correct?
3. stuff like display.contentWidth - does it provide any efficiency advantage to store properties like that in local variables, or is calling it as the display property just as efficient?
Any insight on these questions is GREATLY appreciated. Also, if you have any other efficiency tips for coding in Lua or Corona, I'd love to hear them.
Thanks in advance!