I need to quickly lookup items in a struct, in which there's a 10% chance
that the key will not exist.  Offhand, does anyone have an idea which would
be faster: Using StructKeyExists() first, then using StructFind() (or an
associative-array style construct) if the first function is true, or just
using StructFind() and trapping the exception generated if the key doesn't
exist?  Seems the first method requires CF to search the struct for the key
twice 90% of the time, unless CF somehow caches the lookup.  But I have no
idea how much of a penalty throwing and catching the exception 10% of the
time might be.

Jim
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to