lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 4/15/07, Asko Kauppi <askok@dnainternet.net> wrote:
Can you give practical examples about cases, where Lua code could be optimized?  

No I couldn't. That's a specialist's subject, I'm not one of them, and my favorite way to optimize is to write whatever must go really fast in C. Which is one of the reasons why I love Lua.

replacing a number of a= a..b with table.concat() is way outside of the optimization scope, right?

That kind of macro optimization could be implemented with some term rewriting system, which is a particular case of AST manipulation. There are interesting things to do at high level, look at http://mlton.org for instance, but that would be a big project to undertake, for a limited benefit given Lua's C-friendliness.