Remember, folks, that you don't have to start with 1 in a FOR-NEXT loop.

A=1
FOR I = 2 TO 50000
   A := @VM:I
NEXT I

Just a peanut from the gallery being thrown.  <smile>
BobW

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dzevad Dizdar
Sent: Sunday, August 21, 2005 9:27 PM
To: [email protected]
Subject: Re: [U2] REMOVE results as promised.

Hi Mark,

There is another fast method to consider

A=""
FOR I=1 TO 50000
  IF A = "" THEN
    A := I
  END ELSE
    A := @VM : I
  END
NEXT I

It will take less then 1 second to finish on our system.
Dzevad

----- Original Message ----- 
From: "Mark Johnson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, August 21, 2005 12:27 PM
Subject: [U2] REMOVE results as promised.


> As promised, here are the results of 9 different methods of appending.
> Basically program went like this:
>
> A=""
> FOR I=1 TO 50000
>     A<1,-1>=I
> NEXT I
>
> Style 1: <1,-1>
> straight.......................................................1
minute, 
> 29
> seconds
> Style 2: <-1> attribute level then CONVERT to
> 253...............................41 seconds
> Style 3: DIM(50,000), MATWRITE, READ & 
> CONVERT.............................2
> seconds
> Style 4: DIM(50,000), then assign to variable and CONVERT to 
> 253............1
> second
> Style 5: Target = null, []
> replacing........................................................40 
> seconds
> Style 6: Target=Space(1000000), [] replacing then TRIM........8
minutes, 
> 55
> seconds.
> Style 7: Append, VM assigned inside
> loop..............................................41 seconds
> Style 8: Append, VM assigned outside loop then remove 
> last..................34
> seconds.
> Style 9: <1,MV> with MV+=MV as pointer.............................1 
> minute,
> 28 seconds
>
> 60 user D3 system on W2000 during normal business day.
>
> It appears that Styles 3 & 4 escaped the suggestions and rose to the
top.
> Apparently the CONVERT (or RAISE/LOWER) functions are pretty quick.
The 
> DIM is
> incredibly quick.
>
> I learned a lot and hope others can as well.
> Thanks for everyone's suggestions.
> Mark Johnson
>
> If anyone wants further coding for any of the styles then don't
hestitate 
> to
> ask.
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/ 
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to