RE: Which is quicker

2004-02-12 Thread Nando
sorry, you're right! ... too quick! -Original Message- From: Philip Arnold [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 3:26 PM To: CF-Talk Subject: RE: Which is quicker > or outside the tag: > > cfif x=y >  isChecked = "checked" > else &g

RE: Which is quicker

2004-02-12 Thread David Ashworth
doh still in the transitional phase from ASP to ColdFusion but you catch my drift -Original Message- From: Philip Arnold [mailto:[EMAIL PROTECTED] Sent: 12 February 2004 14:26 To: CF-Talk Subject: RE: Which is quicker > or outside the tag: > > cfif x=y >  isChecke

RE: Which is quicker

2004-02-12 Thread Philip Arnold
> or outside the tag: > > cfif x=y >  isChecked = "checked" > else >  isChecked = "checked" > /cfif > > Only if you want it to always be checked Oh, and to break since you can't do "cfif x=y" it'd have to be "cfif x eq y" [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe

RE: Which is quicker

2004-02-12 Thread Nando
or outside the tag: cfif x=y isChecked = "checked" else isChecked = "checked" /cfif -Original Message- From: Bill Grover [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 3:03 PM To: CF-Talk Subject: RE: Which is quicker Interesting, thanks.  I tho

RE: Which is quicker

2004-02-12 Thread Philip Arnold
> Interesting, thanks.  I thought I had done that before and > received an error about not being able to nest the CFIF tag > inside another tag.  But it is very possible I was using a > CFINPUT instead of a regular INPUT.  I was probably on v4.01 > at the time as well. It's only CF tags that

RE: Which is quicker

2004-02-12 Thread Philip Arnold
> The one place I've found that I really like the IIF is to use > it in areas like the following code sample: > > >name="#REQUEST.cReorderFormArtPrefix##ReorderJob.ljob#" >value="Yes" > > #IIF(laReorderJobs[lnLoop][REQUEST.cReorderFormArtPrefix] NEQ "", > DE(

RE: Which is quicker

2004-02-12 Thread Bill Grover
__ -Original Message- From: David Ashworth [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 9:00 AM To: CF-Talk Subject: RE: Which is quicker you wouldn't have to code it twice using CFIF just have the CFIF around the checked parameter checked> -Original

RE: Which is quicker

2004-02-12 Thread David Ashworth
you wouldn't have to code it twice using CFIF just have the CFIF around the checked parameter checked> -Original Message- From: Bill Grover [mailto:[EMAIL PROTECTED] Sent: 12 February 2004 12:47 To: CF-Talk Subject: RE: Which is quicker The one place I've found that

RE: Which is quicker

2004-02-12 Thread Bill Grover
atthew Walker [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 6:27 PM To: CF-Talk Subject: RE: Which is quicker Really? I'm getting about 50 and 150ms respectively. So for me while iif() is slower it's only one hundredth of a millisecond difference i.e. way below anything I&#x

RE: Which is quicker

2004-02-11 Thread Tom Kitta
know. TK   -Original Message-   From: Barney Boisvert [mailto:[EMAIL PROTECTED]   Sent: Wednesday, February 11, 2004 7:43 PM   To: CF-Talk   Subject: RE: Which is quicker   I ran several tests to check the relative performance of the various   conditional things. In every case, the idea was to check

RE: Which is quicker

2004-02-11 Thread Barney Boisvert
Sent: Wednesday, February 11, 2004 3:39 PM > To: CF-Talk > Subject: RE: Which is quicker > > Interesting that people's ideas of good programming style are > so different. > I think we generally consider good style to be the way we as > individuals > normally do it,

RE: Which is quicker

2004-02-11 Thread Matthew Walker
from, therefore to me that's good style. I would also write recordset.recordcount> and consider that elegant. Others find it appalling. -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 February 2004 11:34 a.m. To: CF-Talk Subject: Re: Which is quicker -

Re: Which is quicker

2004-02-11 Thread Jim McAtee
- Original Message - From: "Matthew Walker" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, February 11, 2004 3:34 PM Subject: RE: Which is quicker > cfswitch is both quicker and more elegant. The only downside is that it >

RE: Which is quicker

2004-02-11 Thread Matthew Walker
Sent: Thursday, 12 February 2004 11:11 a.m. To: CF-Talk Subject: RE: Which is quicker You may get these results due to use of de(), run this code, which I think is more fair: 12 #temp-getTickCount()# #iif(i mod 2, 1, 2)# #temp-getTickCount()# I got 15 - 16 as results for bo

RE: Which is quicker

2004-02-11 Thread Tom Kitta
Ooops, I forgot to say that my tests are all on MX6.1, of course on CF5 'iif' is painfully slow. TK   -Original Message-   From: Philip Arnold [mailto:[EMAIL PROTECTED]   Sent: Wednesday, February 11, 2004 6:11 PM   To: CF-Talk   Subject: RE: Which is quicker   > I don'

RE: Which is quicker

2004-02-11 Thread Tom Kitta
Original Message-   From: Barney Boisvert [mailto:[EMAIL PROTECTED]   Sent: Wednesday, February 11, 2004 6:00 PM   To: CF-Talk   Subject: RE: Which is quicker   Not always the case, because of it's dynamic evaluation capabilities.  And   those same dynamic evaluation capabilities make it

RE: Which is quicker

2004-02-11 Thread Tom Kitta
Message-   From: Matthew Walker [mailto:[EMAIL PROTECTED]   Sent: Wednesday, February 11, 2004 5:57 PM   To: CF-Talk   Subject: RE: Which is quicker   My test indicates iif() is about 400% slower. But the real issue is code   readability. If you think it's more readable in any or all circumst

RE: Which is quicker

2004-02-11 Thread Philip Arnold
> I don't know why people don't like iif (immediate if), it is > as quick as cfif and takes only one line. For simple things, > like "if x < y print true else print false", I think using > iif makes code shorter without sacrificing clarity and speed. > > If you don't believe iif is fast then I

Re: Which is quicker

2004-02-11 Thread Jim Campbell
> > > > > > > > > > > > > #iif(i mod 2, de("!"), de("?"))# > > > > > > > > > > -Original Message- > From: Tom Kitta [mailto:[EMAIL PROTECTED] > Sent: Thursday, 12 February 2004 10:47 a.m. > To: CF-

RE: Which is quicker

2004-02-11 Thread Matthew Walker
venson [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. > > Brya

RE: Which is quicker

2004-02-11 Thread Barney Boisvert
47 PM > To: CF-Talk > Subject: RE: Which is quicker > > I don't know why people don't like iif (immediate if), it is > as quick as > cfif and takes only one line. For simple things, like "if x < > y print true > else print false", I think using iif

RE: Which is quicker

2004-02-11 Thread Barney Boisvert
> -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 & Dire

RE: Which is quicker

2004-02-11 Thread Matthew Walker
light. Here's my sample: !? #iif(i mod 2, de("!"), de("?"))# -Original Message- From: Tom Kitta [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 February 2004 10:47 a.m. To: CF-Talk Subject: RE: Which is quicker I don't know why people d

Re: Which is quicker

2004-02-11 Thread Bryan Stevenson
.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   

RE: Which is quicker

2004-02-11 Thread Tom Kitta
is fast then I encourage you to write a small test and see for yourself. TK   -Original Message-   From: Matthew Walker [mailto:[EMAIL PROTECTED]   Sent: Wednesday, February 11, 2004 5:34 PM   To: CF-Talk   Subject: RE: Which is quicker   cfswitch is both quicker and more elegant.

RE: Which is quicker

2004-02-11 Thread Barney Boisvert
ailto:[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

RE: Which is quicker

2004-02-11 Thread Matthew Walker
cfswitch is both quicker and more elegant. The only downside is that it doesn't handle dynamic values. Iii() is one of those functions, like evaluate(), usage of which is generally discouraged. -Original Message- From: Parker, Kevin [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 February

Re: Which is quicker

2004-02-11 Thread Bryan Stevenson
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] ---

RE: Which is quicker

2004-02-11 Thread Tony Weeg
cfcase / cfswitch is the desired method of choice, from what ive always been told. since the cfif have to all be evaluated for each request. tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonym