Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which is faster: array or cursor?
Message
De
09/03/2009 16:47:14
Walter Meester
HoogkarspelPays-Bas
 
 
À
09/03/2009 16:41:29
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01386748
Message ID:
01386777
Vues:
106
>Using this exact same code, cursor was 3 seconds slower than using an array on my dual core machine
>
>Probably depends on whether VFP spans the cursor to disk. ;-)

? FILE(DBF()) returns .F., so, no the cursor does not hit the disk. It must be something else.



>Cursors are definitely quicker if the algorithm loops quickly and benefits from an index. In this case it doesn't, so probably there's no great advantage to be found. Referring to field names may be more readable than array dimensions, though you can achieve similar readability using #DEFINES.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform