lua-users home
lua-l archive

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

On Fri, Oct 25, 2019 at 12:46 AM bil til <> wrote:
> Do you have an idea why this bloats the code by 11/56k (dll / luac)?

I never did look into this. I would have to learn how to compare the
contents of binary files....

> As I would like to avoid to go through your code in any detail: Are there
> MANY functions, which need to be changed? (do you have an idea, which
> functions would "bloat up" most, if this is allowed?)

The changes only involved the lexer. Loading a Lua script might be
slower (particularly if it contains bytes greater than 0x7F), probably
not by much (no additional allocations are required at least), but I
haven't tried to measure it.

Normalization, so that á and á aren't separate identifiers, would
require even more Unicode data, and probably memory allocation, which
would slow things down more; but I never added it because I didn't
figure out how to store the normalized identifier in the lexer buffer.
Another difficulty is that I'd need to use a Unicode library, like
utf8proc, to do the normalization, and Lua is supposed to be
self-contained! :-(

— Gabriel