lua-users home
lua-l archive

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

I'm glad if performance is the only issue you'd have about this.  :)

Is it?

Parsing text scripts (not bytecode) will take longer, but the whole token filter approach hasn't been performance optimized yet, either. It's kind of chicken and egg, in many ways.

My first reaction to Andy's "token filters only in C" approach was - yack, they're so easy to do in Lua-. But in a way being able to compile the _interpreter_ patched, without touching the lexer / library side would indeed grant most of the benefits. And it would clearly state, which one people are using (think: lua51, lua51- continue, lua51-incdec). But so would: lua51, lua51 -lcontinue -lincdec.

Only, making filters in C does not sound fun to me, at all.


Roberto Ierusalimschy kirjoitti 13.4.2007 kello 19:45:

How about getting token filters into the game, and then _reducing_
even the currently existing sugar (: notation, function name() etc.)
into a joint default token filter (let's say -llua51), and out of the
C lexer.

Is there any estimates for the resulting performance? (Not to mention
how to implement the : notation correctly [that is, without extra side
effects] with token filters...)

-- Roberto