lua-users home
lua-l archive

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


Bogdan Marinescu wrote:
> I ran 'life.lua', and the results surprised me. Specifically, I can see lots
> and lots of realloc calls with a one byte difference between the old block
> size and the new block size, in both directions (+1 or -1 difference).

This particular program spends most of its time doing char-by-char
string concatenation in a tight loop. This is not a recommended
practice and hopefully not representative for professionally
written Lua programs.

Most of the stuff in the test directory should be ignored. It
exhibits bad programming practice (e.g. no locals), people have
been abusing these for benchmarking Lua and despite the directory
name it's not a test suite at all. It gives newcomers a bad first
impression of Lua. This was discussed two years ago, but nothing
happened.

--Mike