You're comparing apples to oranges. The structFind() function returns the value of a structure key, whereas listFind() returns the index position of the matched value in a list.
In order to properly compare the two functions, you would need to do a structKeyList(), then listFind(), followed by a listGetAt(). At that point you will have the keyname and you could perform a direct structure reference (ie, structure[keyname]) to get the value. In this scenario I would just use structFind() as it's more concise and most likely faster. If you're just testing for the presence of a key in a structure, use structKeyExists(). Again, it's more concise than doing structKeyList() followed by listFind(). Also, I agree with Michael: struct functions are much faster than list functions. Keep in mind that lists are essentially just strings, and string parsing is sloooooow compared to variable referencing. Matt Matthew Drayer Web Development Coordinator HCPro, Inc. Marblehead MA [EMAIL PROTECTED] >Structure is faster. I have some tests I posted to the list a while back >with the numbers. I'll have to find it again and add it to the faq. > >> Hi. I have the option to search a structure for a key or a list for the >> key name. Which one yeilds the better performance? Thanks. >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183547 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

