What is more faster Bank or Array

Blitz3D Forums/Blitz3D Programming/What is more faster Bank or Array

Eole(Posted 2003) [#1]
What is more faster between a Bank and an Array ?

When you have 1048576 different byte value to stoke, and you must often read . . .

dim Value[1048576 ]
or
Value=CreateBank(1048576)

thank


Koriolis(Posted 2003) [#2]
Should be the arrays. For such things you'd better test it yourself, it takes 2 minutes to write a test program.


Beaker(Posted 2003) [#3]

dim Value[1048576]

Looks like you are mixing up your 2 array varieties.

Should be:
Dim value(1048576)
or
Local value[1048576]

Arrays are faster as far as I remember. But there isn't that much in it.


Eole(Posted 2003) [#4]
thank

I prefer array like this Value[122121] There is more functionnality, look at this article in Blitzcoder page

http://www.blitzcoder.com/cgi-bin/code/code_showentry.pl?id=thechange09052002191420&comments=no

I aldready never know if an array ar more quickly than a bank . . .


Beaker(Posted 2003) [#5]
But, the point was that you can't use Dim with square brackets.

One thing that article doesn't mention is that Blitz arrays inside Type objects take far to long to delete, making them
quite slow for many uses.