>- see footer for list info -<
Yes that is correct, all cases will be evaluated until a match is found, how
else could it work?

But here is a little nugget.
If you are evaluating strings in your cfcases, as you probably are 99% of
the time. CFIF/ELSE is faster.

Russ

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Terry Riley
Sent: 07 August 2006 11:15
To: [email protected]
Subject: Re: [CF-Dev] CFSwitch... Aren't all cases evaluated?

>- see footer for list info -<
----- Original Message -----

> *From:* "Jolly Green Giant" <[EMAIL PROTECTED]>
> *To:* [email protected]
> *Date:* Sun, 6 Aug 2006 23:07:50 -0400
> 
> >- see footer for list info -<
> I'm studying for my certification.  Forta, in the study book, says 
> that "like cfif, you should put the most popular cases at the top of 
> the cfswitch block to improve performance.
> 
> I thought one of the things was that all the cases were going to be 
> evaluated anyway?  If they're all evaluated, then their location is no 
> performance gain, right?

I don't think they are all evaluated, unless it goes to the default case
(which is usually last). IIRC, evaluation continues until a match is found.

There may be others out there that disagree....

HTH

Terry 


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help 
>-<


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to