Well, the Java language is incapable of doing a switch on anything except an
int (or char), so you can't turn a CFSWITCH into a Java switch unless the
_expression_ is an int.  I'm obviously not privvy to the CF codebase, but
that's a language limitation that's been there since the beginning.

Or were you refering to the chaining stuff?  Again, I've not seen source,
but I can't think of a good reason to evaluate all the criteria when you
don't have to.  Same thing as short-circuit boolean operations within a
single boolean _expression_.

Cheers,
barneyb

> -----Original Message-----
> From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 11, 2004 2:50 PM
> To: CF-Talk
> Subject: Re: Which is quicker
>
> So Barney this has changed since CF 5 then??
>
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]
>
> ---------------------------------------------------------
> Macromedia Associate Partner
> www.macromedia.com
> ---------------------------------------------------------
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
>   ----- Original Message -----
>   From: Barney Boisvert
>   To: CF-Talk
>   Sent: Wednesday, February 11, 2004 2:44 PM
>   Subject: RE: Which is quicker
>
>
>   Actually, they both only check until they find a match,
> assuming you're
>   using CFELSEIF in there to bind them all togther.
>
>   Both constructs are done as IF statements at the Java
> level, so you don't
>   get the 'usual' benefit of a switch construct.  CFSWITCH
> might be faster
>   (particularly if the _expression_ value is expensive to
> compute) if the CF
>   engine uses a temporary variable, but for simple
> expressions, that might
>   actually slow things down, because doing that's an extra step to do.
>
>   Cheers,
>   barneyb
>
>   > -----Original Message-----
>   > From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
>   > Sent: Wednesday, February 11, 2004 2:33 PM
>   > To: CF-Talk
>   > Subject: Re: Which is quicker
>   >
>   > CFCASE will be a tad quicker
>   >
>   > Basically CFIF has to check ALL conditions where CFCASE will
>   > stop when it finds the correct case.
>   >
>   > Bryan Stevenson B.Comm.
>   > VP & Director of E-Commerce Development
>   > Electric Edge Systems Group Inc.
>   > t. 250.920.8830
>   > e. [EMAIL PROTECTED]
>   >
>   > ---------------------------------------------------------
>   > Macromedia Associate Partner
>   > www.macromedia.com
>   > ---------------------------------------------------------
>   > Vancouver Island ColdFusion Users Group
>   > Founder & Director
>   > www.cfug-vancouverisland.com
>   >   ----- Original Message -----
>   >   From: Parker, Kevin
>   >   To: CF-Talk
>   >   Sent: Wednesday, February 11, 2004 2:29 PM
>   >   Subject: Which is quicker
>   >
>   >
>   >   Can I get a little advice on which is quicker or which is
>   > the preferred way
>   >   of programming - there are 8 items to select from:
>   >
>   >   CFIF, CFCASE or IIF
>   >
>   >   TIA!
>   >
>   >   +++++++++++++++++++
>   >   Kevin Parker
>   >   Web Services Manager
>   >   WorkCover Corporation
>   >
>   >   p: 08 8233 2548
>   >   e: [EMAIL PROTECTED]
>   >   w: www.workcover.com
>   >   +++++++++++++++++++
>   >
>   >   
>   > **************************************************************
>   > **********
>   >   This e-mail is intended for the use of the addressee
> only. It may
>   >   contain information that is protected by legislated
> confidentiality
>   >   and/or is legally privileged. If you are not the intended
>   > recipient you
>   >   are prohibited from disseminating, distributing or copying
>   > this e-mail.
>   >
>   >   Any opinion expressed in this e-mail may not necessarily be
>   > that of the
>   >   WorkCover Corporation of South Australia. Although
> precautions have
>   >   been taken, the sender cannot warrant that this e-mail
> or any files
>   >   transmitted with it are free of viruses or any other defect.
>   >
>   >   If you have received this e-mail in error, please
> notify the sender
>   >   immediately by return e-mail and destroy the original
> e-mail and any
>   >   copies.
>   >   
>   > **************************************************************
>   > **********
>   >
>   >
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to