View Single Post
07/14/14, 09:47 AM   #32
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Also table.concat is more efficient than joining a bunch of strings with concatenation operators (..).

When you combine a string using "abcd" .. "e", it'll copy it all into a new longer string rather than just appending. As such, adding a little bit on for each step of a loop incurs a lot of overhead from copying over and over in memory (and overhead from the garbage collector too). For the table, it just grabs a little more memory each time, and does the copying once when you combine it at the end with table.concat()
  Reply With Quote