Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting field presence in dbf
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244177
Message ID:
01245080
Views:
29
>Your approach via afields() is in best cases one of, if not *the* slowest solutions, and your implementation is evidently not the speediest one. So I rearranged the code a bit to get at least a speedier implementation of the afields()-approach.

I haven't reviewed that code again prior to writing this, however I don't believe anything you did had a significant effect on the execution speed. The thing that I did change was to get rid of ASUBSCRIPT. I think that was a leftover from days gone by. But your change did not include that. Part of the ridiculousness of this thread is the emphasis on speed, when the great majority of the time the gain is truly insignificant. Especially on something like the function in question that is unlikely to be used in a loop. Frankly, I do not worry about the speed of execution on functions like this. My concern has more to do with correctness, readability, and maintainability. I think about speed, but this emphasis that one person in this thread has placed on this issue is really overblown. There are more important factors in good programming than execution speed. I spend my time making sure SQL statements and loops execute speedily, but worrying about it in functions like this is almost always pointless. If a customer has a complaint about speed, it's almost always related to some report doing a complex SQL statement and that's where I work at the optimization.

>What I was making fun of is the part in the commentary reserving copyrights (yes, I guess it was just copied from your sources at work) - similar functions were in the public before 2001 (probably even in the last century<g>) and defining a line between "forbidden copy" and "own implementation" would be hard to argue in view of prior art.

Don't be so quick to make fun of things you don't really understand. All that commenting is really just boilerplate stuff. I'm not sitting around trolling the Internet for people using functions similar to mine to try to sue them. At the same time, I'm not going to spend time trying to figure out what is really my new creation and what's been done before. I just slap that comment section on it, make the necessary changes and off I go. I've thought about the fact that the code I write is mostly owned by my clients and it has my "copyright" all over it. Hasn't bothered a one of them, yet.

>I would not use ANY afields-approach, as there are non-extreme settings were it is not only near/on the bottom speed wise, but also worse than the best implementation by a factor greater than 100.

I doubt your numbers.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform