Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_DBSkip() vs. SKIP
Message
De
02/12/1999 02:04:13
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
01/12/1999 20:28:19
Juan Kh
Dataprop Technologies
Sungai Petani, Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00297701
Message ID:
00297778
Vues:
18
>Hi all,
>
>I am working on a table that has a maximum records of 10,000. However, I need to SKIP through every records and every fields in this table to perform some calculation. The program is kind of like "solver" type (solving for at least 60,000 variables), looking for the best value. The number of iterations is extremely high. Would it be better to write a C fll to perform this? My worry is that calling back to VFP (_DBSkip()) would yield the same speed, eventhough I can expect speed increase in other calculations.
>
>It would be great if someone could propose a better idea.
>
>Regards,
>juan


I never tested speed of skip vs _DbSkip(). Even it might be 100% percent slower (I don't say it's), skipping a 10000 records would be nothing compared to other calculations. VFP math is fast too. If that was a string operation I would say absolutely try FLL. 60000 variables are in scope of VFP. You can create 65000 variables and any array could have 65000 elements as well. When it's FLL you should be carefull for allocation of all those variables which greatly needs calls to VFP memory manager. You can't know which would be better before you try a prototype. If routine needs other table operations other than skip then pure VFP version might be better. Instead of skipping you could even get "nextrecord" with file stream operations in C. You could just write a FLL function for "per record" calculation and do the rest in VFP. Also instead of skipping you could lend all data to C with an array. I cut down a 40+ secs operation to 2+ secs with FLL version in the past but it was all about string operations.
Since this is a "solver" operation even an OLEAutomation to Excel solver might be an option.
Whatever you choose you would need an optimized algorithm.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform