07-17-2024, 09:31 AM
And it may be this:
Code: (Select All)
REDIM foo(0) AS LONG
t# = TIMER
FOR i = 0 TO 1000000
REDIM _PRESERVE foo(i) AS LONG
foo(i) = i
NEXT
t1# = TIMER
PRINT USING "###.### seconds to REDIM 1,000,000 item array."; t1# - t#
DIM foo2(10000000) AS LONG
t# = TIMER
FOR i = 0 TO 10000000
foo2(i) = i
NEXT
t1# = TIMER
PRINT USING "###.### seconds to DIM 1,000,000 item array."; t1# - t#