> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Richard Kaye
> Sent: Tuesday, February 13, 2007 9:59 AM
> To: [EMAIL PROTECTED]
> Subject: Re: VFP 9, Grid highlighting
> 
> I wonder how the new (in 9) ICASE function stacks up performance-wise.
> Have you tried it? I would think a single inline function would run
> faster than nested IIFs but as the wise around hear always say, test,
> test, test...
> 
> Jeff Johnson wrote:
> >>>> Peter:  I went to one of Andy Kramek's sessions at Whilfest one year
> on
> >>>> optimization of VFP.  While the nested IIF's can get messy, they are
> >>>> significantly faster than CASE, IF-ELSE-ENDIF or using a UDF.  I find
> >>>>
> > Michael:  The grid highlighting occurs each time the status of a record
> > changes.  Many records can have their status change by various methods.
> > Originally this was done with a case statement in a method of the form
> and
> > the painting of the grid was not acceptable.
> >
> 
> --
> Richard Kaye
> Vice President
> Artfact/RFC Systems
> Voice: 617.219.1038
> Fax:  617.219.1001
> 
> For the fastest response time, please send your support
> queries to:
> 
> Technical Support - [EMAIL PROTECTED]
> Australian Support - [EMAIL PROTECTED]
> Internet Support - [EMAIL PROTECTED]
> All Other Requests - [EMAIL PROTECTED]
> 

Richard:  I ran a test with five nested IIF() statements and the identical
ICASE() statement.  I put them in a FOR NEXT loop of 100,000.  Each time I
ran it I got slightly different results!  .216 seconds for the IIF() vs.
.202 seconds for the ICASE().  Although different results, the ICASE() was
quicker 5 out of 6 times.  They seem to be very comparable with the ICASE()
being much easier to code and read.

Jeff 


Jeff Johnson
[EMAIL PROTECTED]
623-582-0323
Fax 623-869-0675



--- StripMime Report -- processed MIME parts ---
multipart/signed
  text/plain (text body -- kept)
  application/x-pkcs7-signature
---


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to