Concat 2 strings of 4 chars with ..
local function Test ()
local l
for i = 1 , 100000 do
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
l = " ABCD" .. " EFGH"
end
end
Concat 2 strings of 4 chars with format
local function Test ()
local l
local format = string.format
for i = 1 , 100000 do
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
l = format (" ABCD%s" , " EFGH" )
end
end
Concat 4 strings of 4 chars with ..
local function Test ()
local l
for i = 1 , 100000 do
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
end
end
Concat 4 strings of 4 chars with format
local function Test ()
local l
local format = string.format
for i = 1 , 100000 do
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s" , " EFGH" , " IJKL" , " MNOP" )
end
end
Concat 8 strings of 4 chars with ..
local function Test ()
local l
for i = 1 , 100000 do
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
l = " ABCD" .. " EFGH" .. " IJKL" .. " MNOP" .. " ABCD" .. " EFGH" .. " IJKL" .. " MNOP"
end
end
Concat 8 strings of 4 chars with format
local function Test ()
local l
local format = string.format
for i = 1 , 100000 do
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
l = format (" ABCD%s%s%s%s%s%s%s" , " EFGH" , " IJKL" , " MNOP" , " ABCD" , " EFGH" , " IJKL" , " MNOP" )
end
end
local function Test ()
local l
for i = 1 , 100000 do
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
l = tostring (1234 )
end
end
local function Test ()
local l
local format = string.format
for i = 1 , 100000 do
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
l = format (" %d" , 1234 )
end
end
Concat 2 numbers with ..
and tostring
local function Test ()
local l
for i = 1 , 100000 do
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
l = tostring (1234 ) .. tostring (5678 )
end
end
Concat 2 numbers with format
local function Test ()
local l
local format = string.format
for i = 1 , 100000 do
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
l = format (" %d%d" , 1234 , 5678 )
end
end
Concat 4 numbers with ..
and tostring
local function Test ()
local l
for i = 1 , 100000 do
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
l = tostring (1234 ) .. tostring (5678 ) .. tostring (9012 ) .. tostring (3456 )
end
end
Concat 4 numbers with format
local function Test ()
local l
local format = string.format
for i = 1 , 100000 do
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
l = format (" %d%d%d%d" , 1234 , 5678 , 9102 , 3456 )
end
end