Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Minimum
Message
From
24/06/2014 16:45:31
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
 
To
24/06/2014 08:54:35
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01601946
Message ID:
01602334
Views:
68
>>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 ;-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform