If you don't care about the resulting position - i.e. you just want to
know if the list contains the item, then the absolute quickest method is
to use INDEX().

Eg looking for "JKL" in "ABC}DEF}GHI}JKL}MNO}PQR" 

THE.LIST = @VM:"ABC}DEF}GHI}JKL}MNO}PQR":@VM
IF INDEX(THE.LIST,@VM:"JKL":@VM,1) THEN found

The extra value marks at the beginning and end are required to ensure
the value you're looking for isn't contained within another value.

Even if you do need the position, INDEX can be quicker, just use COUNT
afterwards to determine the number of marks that appear before the INDEX
position.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barry Brevik
Sent: Thursday, 3 August 2006 8:24 AM
To: U2-users (E-mail)
Subject: [U2] [UV] FIND vs LOCATE- speed?

When using FIND or LOCATE on a dynamic array, is one faster than the
other, and is there any reason to sort the array to (hopefully) improve
the speed of FIND or LOCATE?

I don't need to use LOCATE... BY... SETTING, I'm just doing a raw FIND
or LOCATE.

Barry Brevik
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/


DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to