Re: How is cfswitch better that cfif?

2008-05-30 Thread s. isaac dealey
> Yeh, great explanation from barney. > > I'd just like to add that, knowing this, the choice between if and > switch in CF is then down to readability / logic / personal > preference. If there is a conditional that has a single simple > expression with several 'options', switch reads far better t

Re: How is cfswitch better that cfif?

2008-05-30 Thread Barney Boisvert
You can do whatever you want, of course. I was just prioritizing by ROI. God knows there are enough decisions made directly in the fact of maximizing ROI. cheers, barneyb On Fri, May 30, 2008 at 12:32 PM, Gerald Guido <[EMAIL PROTECTED]> wrote: > On Fri, May 30, 2008 at 1:36 PM, Barney Boisvert

Re: How is cfswitch better that cfif?

2008-05-30 Thread Gerald Guido
On Fri, May 30, 2008 at 1:36 PM, Barney Boisvert <[EMAIL PROTECTED]> wrote: > optimize your DB, add caching, check for any "silly" > algorithms (query w/in a loop where a JOIN would work, etc.). Then > tune your JVM. Then buy more hardware. Then switch from CF to a > lower-level language.

RE: How is cfswitch better that cfif?

2008-05-30 Thread Mike Francisco
icial docs as gospel'. :-) > -Original Message- > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > Sent: Friday, May 30, 2008 10:42 AM > To: CF-Talk > Subject: Re: How is cfswitch better that cfif? > > the webapper folks had an interesting blog post in the s

Re: How is cfswitch better that cfif?

2008-05-30 Thread Dominic Watson
Yeh, great explanation from barney. I'd just like to add that, knowing this, the choice between if and switch in CF is then down to readability / logic / personal preference. If there is a conditional that has a single simple expression with several 'options', switch reads far better to me. Otherw

RE: How is cfswitch better that cfif?

2008-05-30 Thread Mike Francisco
> > That was a rumor a few years ago, because switch frequently performs > better in lower-level languages because of reduced expression > evaluation. Thanks for the suggestions Barney, Andy. The unusual thing about this is that even Adobe's own CF8 ref docs do mention about the better perfor

Re: How is cfswitch better that cfif?

2008-05-30 Thread Charlie Griefer
the webapper folks had an interesting blog post in the subject as well... http://www.webapper.net/index.cfm/2006/7/27/20060727042244 altho it seems that the issue they address was resolved in CF8. still, an interesting read :) On Fri, May 30, 2008 at 10:38 AM, Barney Boisvert <[EMAIL PROTECTED

Re: How is cfswitch better that cfif?

2008-05-30 Thread Barney Boisvert
Here's the link to my post from back then. Figured I could do the googling and save everyone else the trouble: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:152825 On Fri, May 30, 2008 at 10:36 AM, Barney Boisvert <[EMAIL PROTECTED]> wrote: > That was a rumor a few years ago,

Re: How is cfswitch better that cfif?

2008-05-30 Thread Barney Boisvert
That was a rumor a few years ago, because switch frequently performs better in lower-level languages because of reduced expression evaluation. I did some testing and found that the opposite is true in CF: CFIF performs better than CFSWITCH. Not all conditionals can use CFSWITCH, of course, but fo

RE: How is cfswitch better that cfif?

2008-05-30 Thread Andy Matthews
I'm going to guess that switches, and ifs aren't going to be a bottleneck in any of your code. If you're looking to improve performance you'd be best starting at optimizing any of your queries first, then make sure all of your variables are scoped inside CFCs, and the rest of your code, then make s