main logo
Subject: Re: is this a fair test? (SCAN vs DO WHILE)
Author: "Chet Gardiner"
Posted: 2003/01/31 18:01:00
 
View Entire Thread
New Search


FYI. It's a fairer test to use a table and close and reopen the table
between tests.

----- Original Message -----
From: <profox /AT/ cpvfug .D.OT org>
To: <profox@leafe.com>
Sent: Friday, January 31, 2003 3:08 PM
Subject: RE: is this a fair test? (SCAN vs DO WHILE)


> Wilson,
>
> I looked at your code, and that seems to me as to what I did? Now the
example of 3 nested DO WHILEs was different of course because in that case I
also took advantage of indexes and added the FOR clause on the SCAN loop to
be optimizable.
>
> --Michael
> ------------------------------------------------
> On Fri, 31 Jan 2003 14:12:31 -0500, "Wilson M. Kierstead"
<wil /AT/ vfpbizapps .D.OT com> wrote:
>
> <snipped>
> > Therefore, an apples to apples test would be as follows:
> >
> > * Test While loop -Start
> > SELECT table
> > ltstart = datetime()
> > GO TOP
> > do while !EOF()
> > skip
> > enddo
> > ? datetime() - ltstart && show number of seconds taken to skip through
> > entire table
> > * Test While loop -End
> >
> > * Test Scan loop -Start
> > SELECT table
> > ltstart = datetime()
> > SCAN
> > ENDSCAN
> > ? datetime() - ltstart && show number of seconds taken to skip through
> > entire table
> > * Test Scan loop -End
> >
> > Wilson KIerstead
>
>
[excessive quoting removed by server]



 
©2003 Chet Gardiner
<-- Prior Message New Search Next Message -->