Optimization

BlitzMax Forums/BlitzMax Programming/Optimization

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm curious as to see which is more optimized. An Array of Chars or a String.

would:
type TString
Field Chars[]:Char
field NumChars:int
method Print()
local LoopVar:int
for LoopVar = 0 to NumChars
print Chars[LoopVar]
next
end type

And using it like:
Hello:TString = new TString
Hello.NumChars = 4
Hello.Chars:Char = new Char[Hello.NumChars]
Hello.Print()

Would that be more Optimized than:
Hello:String = "Hello"