Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
REDIM takes more resources than DIM?
#5
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#
Reply


Messages In This Thread
REDIM takes more resources than DIM? - by bplus - 07-17-2024, 12:21 AM
RE: REDIM takes more resources than DIM? - by SMcNeill - 07-17-2024, 09:31 AM



Users browsing this thread: 12 Guest(s)