Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single occurrence in a string
Message
From
29/03/2015 11:56:58
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
29/03/2015 07:48:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01617326
Message ID:
01617359
Views:
72
>- All gentleman code was based on brute force, on wich every iteration of the algorithm caused equal or more work in each step. In example, Tore's algorithm read all the info in a table and uses the SQL engine to order it, while Dragan's algorithm uses a variable on which in every iteration is bigger and the search of subtsr is longer

The size of the variable won't exceed 256 bytes. But everything else is as you said - well, I wrote this off the top of my head, a quick fix for the case you don't get anything better. Didn't even try it out.

Such things are frequently put in place and not fixed unless critical. Saving a few milliseconds here and there is nice, if the total saved time for a year is larger than the time you spent making it faster.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform