You know, that's interesting seeing as how a JVM is supposed to be the
great equalizer which makes your code run the "same" on any platform.  

Maybe I'm giving it too much credit... :)

~Brad

-----Original Message-----
From: Sean Corfield [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 03, 2007 12:44 AM
To: CF-Talk
Subject: Re: isdefined vs structkeyexists (was: cfinvoke or
CreateObject)

It's platform specific. On OS X, structKeyExists() is always 20-30%
faster under any circumstances. On Windows isDefined() is often
faster.

On 6/2/07, Brad Wood <[EMAIL PROTECTED]> wrote:
> I have done test with structkeyexists and isdefined and found that it
> actually can depend on whether or not the value exists.  I ran two
> tests, one with a small struct (1 key) and one with a large struct
(500
> keys) and the size of the structs didn't make any difference.
>
> I looped several thousand times and sliced the results 4 different
ways
> in each test:
> isdefined() when the key was NOT present (1254 ms)
> structkeyexists() when the key was NOT present (1172 ms)
> isdefined() when the key WAS present (1087 ms)
> structkeyexists() when the key WAS present (1259 ms)



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279997
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to