Which is Faster?

Blitz3D Forums/Blitz3D Programming/Which is Faster?

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.

So look at this, it s real simulation of type by an array

Type blah
Field value%
Field value2$
End Type

Dim value(10000,10000)
Dim stringarray$(10000,10000)

Print "array access"
t=MilliSecs()
For i=0 To 10000
n=value(i,j)
tt$=stringarray$(i,j)
Next
t=MilliSecs()-t
Print t+" ms"
Print ""


; Creating the type
Print "Creating type"
For i=0 To 10000
b.blah=New blah
Next

Print "type access"
t=MilliSecs()
For b.blah = Each blah
n=b\value%
tt$=b\value2$
Next
t=MilliSecs()-t
Print t+" ms"
Print ""

Print "Press Any Key"
WaitKey
End