Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Minimum
Message
De
24/06/2014 16:45:31
 
 
À
24/06/2014 08:54:35
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01601946
Message ID:
01602334
Vues:
67
>>Huh? for just finding the minimum, stepping once through the store is the fastest option, differences come from implementation details like language. And as the time to sort big arrays increases more than the stepping approach, unless afterwards an operation on sorted items is needed, asort() feels like a bad idea unless used for a particular spot, but not as a common way to resolve the question.
>
>Implementation detail: ASORT is C code. A do while loop is Fox higher level pseudo compiled code. Wouldn't asort be fastest until the list had thousands of entries? Just curious
>
But the rule says not to code to the implementation ;-)

Benchmarking such stuff is not easy if you want to to get more than a snapshot - there might be edge cases like nearly ordered lists or nearly descending ordered lists and so on. And there is nothing stopping you from implementing arrmin/arrmax functions in C - you still have to load the array elements from vfp memory before comparing, so my guess is the speed difference there is nowhere near the 5 to 20 times speedup usually found if going into C memory space as well. Otherwise such functions probably would have been in foxtools for some time now ;-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform