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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Preserving multi-dim arrays Pete 5 416 12-19-2025, 03:17 PM
Last Post: Dimster
  packaging resources tool TempodiBasic 6 584 09-22-2025, 11:16 PM
Last Post: TempodiBasic
  DIM AT -- feature request Jack 2 721 08-15-2023, 12:15 AM
Last Post: grymmjack
  REDIM, TYPE, and STRING Woes TerryRitchie 16 3,176 04-13-2023, 05:17 AM
Last Post: DSMan195276
  suggestion: initialize array values within the DIM statement bobalooie 19 3,379 12-22-2022, 06:46 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)