[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string buffers using string.gsub faster than table.concat
- From: Javier Guerra Giraldez <javier@...>
- Date: Sun, 26 Aug 2012 00:29:13 -0500
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