Lua string concatenation
Posted: Wed Dec 01, 2021 7:40 pm
Hello,
need your opinion.
Currently iam fiddeling around with Pointeroffsets.
I have an repeating pattern. But in between the offsets are changing.
The Output :
[[[[pb]+120]+0]+11A0]
[[[[pb]+120]+8]+11A0]
....
Works as expected.
My question is :
String concatenation is claimed to be slow.
What is your experience ?
How would you solve such a Problem?
Usefull hints or suggestions are welcome.
need your opinion.
Currently iam fiddeling around with Pointeroffsets.
I have an repeating pattern. But in between the offsets are changing.
Spoiler
Code: Select all
local startp = '[[[[pb]+120]+' -- start of Pointerpath
local endp = ']+11A0]' -- end of Pointerpath
local offsetResult = nil
local offsets = {0,8,10,18,20,28,30,38,40,48,50} -- offset Table
for i=1,#offsets do
offsetResult = startp .. offsets[i] .. endp
print(offsetResult) -- or readFloat or whatever
end
[[[[pb]+120]+0]+11A0]
[[[[pb]+120]+8]+11A0]
....
My question is :
String concatenation is claimed to be slow.
What is your experience ?
How would you solve such a Problem?
Usefull hints or suggestions are welcome.