main logo
Subject: RE: is this a fair test? (SCAN vs DO WHILE)
Author: Cotton Mr Jerry P
Posted: 2003/01/31 16:57:00
 
View Entire Thread
New Search


Not only is SCAN faster, SCAN won't skip any records like DO WHILE can.


Field1
Record 1 1
Record 2 4
Record 3 2

SCAN for field1 < 4 will scan two records

DO WHILE field1 < 4 and !EOF() will process one record.

-----Original Message-----
From: Chet Gardiner [mailto:chetdude .at. pacbell DOT net]
Sent: Friday, January 31, 2003 4:10 PM
To: profox@leafe.com
Subject: Re: is this a fair test? (SCAN vs DO WHILE)


Just for more grins:

SCAN vs DO WHILE
VFP 5 - .261 vs .410
VFP 6 - .170 vs .321
VFP 7 - .201 vs .370

Changed it to build a table, close and reopen the table for each test:

VFP 7 - .521 vs .691 <-- Same basic overhead difference...

Glad I tend to use scan.

----- Original Message -----
From: "Crooks, David L." <croodl .at. ispec DOT com>
To: <profox@leafe.com>
Sent: Friday, January 31, 2003 12:48 PM
Subject: RE: is this a fair test? (SCAN vs DO WHILE)


> In VFP6, I got 0.257 for scan and 0.470 for !EOF().
>
> -----Original Message-----
> From: Chet Gardiner [mailto:chetdude .at. pacbell DOT net]
> Sent: Friday, January 31, 2003 3:50 PM
> To: profox@leafe.com
> Subject: Re: is this a fair test? (SCAN vs DO WHILE)
>
>
> Just for grins, I ran it in VFP 7.0 with a couple of changes. Scan was
> faster.
>


[excessive quoting removed by server]



 
©2003 Cotton Mr Jerry P
<-- Prior Message New Search Next Message -->