lua-users home
lua-l archive

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


I think you're benchmarking more than just the string concatenation,
and the overloading of the 'i' variable makes the code do a very
different thing on each 'mode'.

your code (Lua 5.1.4, amd64):

A: 0.481
B: 0.532
C: 1.142
D: (very long)

just replacing each inner 'i' by 'j', and using it for the table index
instead of #ts+1, i got:

A: 0.449
B: 0.293
C: 0.469
D: (still too long)

-- 
Javier